2014/1/11 Vicente J. Botet Escriba
Le 11/01/14 19:45, Oliver Kowalke a écrit :
2014/1/11 Vicente J. Botet Escriba
What would be the advantages of using work-stealing at the fiber level
instead of using it at the task level?
it is very simple because you migate a 'first-class' object, e.g. the fiber already is like a continuation.
yes, but what are the advantages? Does it performs better? It is easy to write them?
because creating depended tasks would not block your thread-pool.
suppose you have a thread-pool of M threads and you create (without
fiber-support) many tasks N.
some of the tasks create other task, executed in the pool, and wait on the
results.
if you have enough tasks N>>M all your worker-threads of the pool would be
blocked.
something like:
void tsk() {
...
for( int i = 0; i