Paul Querna wrote:
Mladen Turk wrote:
Comments, other ideas?

I would prefer to not add a separate 'dedicated' thread, but just 'use' a worker thread, when it is about to idle instead. When you are about to go into the idle wait, check if there are any timed tasks that need to execute soon, and run that instead of going idle.


Since this needs to happen on regular intervals then there has to
be some 'dedicated' thread that will at least pop the idle worker
thread from the pool. I don't see any benefit for adding additional
logic to worker threads that will figure out the reason for wakeup
(accepted socket or task event)
Well instead this thread we could modify the child main to wait both
on exit event and task interval, but this again complicates the
things much more then it should.

IMO this should be just like any listener thread, so that logic
can be decoupled from the main worker logic serving requests.


Regards
--
^(TM)

Reply via email to