Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Multi threading in click #499

@AqsaKashaf

Description

@AqsaKashaf

Hi, I want to write a module which looks something like:
in :: FromDevice(eth1)
q :: Queue
uq :: Unqueue

// do some processing here
out :: ToDevice(eth2)
in -> q -> uq -> processing here -> out

However, I want to do this in a mult-threaded way, assuming I have multiple processing threads. A packet comes on eth1, it is queued. Then I want it to be dequeued by whichever thread is currently not busy and so on. And then finally all threads push the packets out to eth2. I came across ThreadSafeQueue but I am not sure about the Unqueue part.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions