Boost logo

Boost :

Subject: Re: [boost] [threadpool] new version v12
From: Oliver Kowalke (k-oli_at_[hidden])
Date: 2008-11-03 04:14:00

> Yes I know, it does only for the future get() function. What I'm asking is
> to explore the ability to do that for other blocking functions, even not
> >> BTW Olivier,
> >> * could the interrupt function extract the task from the queue if
> the
> >> task is not running already?
> >
> > This would be complicated because we have different queues; one global
> > queue
> > and local worker-queues. The task has to maintain an iterator after
> > insertion
> > of one of the queues etc.
> > The current implementaion stores a interrupt-flag so that the task
> becomes
> > interrupted immediatly after dequeuing.
> This will be better than nothing. Could you tell me where is the code
> doing
> this.

interrupter class

> Anyway with the separation between task and subtask we can avoid the
> problem. A task could be only on the pool queue and a sub_task only on the
> internal worker thread queue.

you still have to store an iterator inside the task and if you call container::erase( iterator) you don't get an information if the operation succeeded
I think it is not worth the the trouble - interrupter flag works


Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen:

Boost list run by bdawes at, gregod at, cpdaniel at, john at