
BTW Olivier, * could the interrupt function extract the task from the queue if
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 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 regards, Oliver -- Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger