in reply to Re: Is it possible to perform concurrent action like loop?
in thread Is it possible to perform concurrent action like loop?
It effectively allows you to run things simultaneously.
Um, no. Not even close.
Event loops run everything serially, in the same single thread. They will not benefit from multi-cores or multi-processors.
And if those things are cpu-bound, they will (collectively) run more slowly than if you just run them one after the other in the normal way.
Events loops are only useful for code that spends most of it's doing nothing but wait. Eg. communications servers and guis.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Is it possible to perform concurrent action like loop?
by zentara (Cardinal) on Mar 20, 2009 at 15:53 UTC |