[Click] RFC: "threading" branch on Github kohler/click

Beyers Cronje bcronje at gmail.com
Thu Jun 2 06:22:54 EDT 2011


Hi Eddie,

Currently the allocation strategy is SUPER simple.  A Timer is associated
> with thread 0, unless there is a StaticThreadSched for its element, in which
> case it is associated with that thread.  One can imagine more complex
> policies, including looking upstream or downstream for related elements, but
> this is a start.
>

Ahh, so we can now assign an element to a thread via StaticThreadSched even
if that element does not have a Task? E.g.

fd::FromDevice(eth0) -> t::SomeElementWithTimerOrSelectFDs -> Discard;
StaticThreadSched(fd 0, t, 1);

Or if we wanted all Timers and file descriptors on thread 0 something like
this:

fd::FromDevice(eth0) -> t::SomeElementWithTimerOrSelectFDs -> Discard;
StaticThreadSched(fd 1);

Is this correct?

Beyers


More information about the click mailing list