Boost logo

Boost :

Subject: [boost] [threadpool] mixture of recursive invokation and fibers?
From: Oliver Kowalke (k-oli_at_[hidden])
Date: 2008-11-05 01:58:56


hello,

Using fibers in the threadpool in order to enable fork/join comes with some difficulties.

My idea is to use recursive sub-task invokation as default and fiber only in some special cases.

1.) parent-task locks a mutex and sub-task has also to lock the mutex -> using recursive_mutex

2.) sub-task waits for signal of parent-task (condition variable) the recursive invokation of sub-task do not work. In this case I would suggest that the sub-task should be executed in a fiber.

task< R >::get() - does recursive invokation of sub-task
task< R >::get( new_context() ) - does execute the sub-task in a new fiber

What do you think about this?

regards,
Oliver

-- 
Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten 
Browser-Versionen downloaden: http://www.gmx.net/de/go/browser

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk