[Click] background processing?

Beyers Cronje bcronje at gmail.com
Thu Jan 25 08:11:27 EST 2007


Hi Nick,

I dont think Click is ideal for asynchronous processing. As you know
standard Click runs in one thread, so basically you're left with Task/Timer.
You can try playing around with SMP Click and have your element scheduled on
it's own CPU, but I havent had much luck getting a stable SMP Click
installation. Maybe someone else can comment on their experiences with SMP
Click?

Stuff that might assist you:

ScheduleInfo http://www.read.cs.ucla.edu/click/elements/scheduleinfo - You
can ensure your task is scheduled less often than other tasks.

Possibly subscribe to a NotifierQueue and only schedule your task if the
upstream queue is empty, depending on your configuration this might indicate
when there are low traffic going through Click.

What type of processing do you want to do?

Regards

Beyers



On 1/25/07, Nicholas Murphy <nmurphy at cs.washington.edu> wrote:
>
> If I want to have a background process in click that does
> asynchronous processing, what's the best way to do it?  Task/Timer?
>
> What I'd ideally like is something that basically runs when there are
> spare CPU cycles.  In other words, it would ideally strictly defer to
> the main click processing thread.
>
> Suggestions?  I actually tried just spawning a new thread with
> pthreads, but unfortunately I'm running into compilation issues with
> pthread.h and c++. :-/
>
> (I'm only concerned with userlevel for the moment)
>
> Thanks,
> Nick
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
>


More information about the click mailing list