Linked by Thom Holwerda on Sun 18th Jan 2009 11:16 UTC, submitted by anonymous
General Unix Protothreads are a type of extremely lightweight threads - each protothread requires only two bytes of memory - that are usually used for embedded firmware programming, where memory is at a premium. Protothreads combine the low overhead with event-driven programming with the algorithmic clarity of threaded programming.
E-mail Print r 5   · Read More · 16 Comment(s)
Thread beginning with comment 344279
To view parent comment, click here.
To read all comments associated with this story, please click here.
PlatformAgnostic
Member since:
2006-01-02

Threads which are blocked should not consume any computational reasources... only memory, so if you use threads only as a means of specifying your algorithm and you don't have too many running concurrently, 10,000 threads should only increase your memory footprint and startup time without affecting runtime performance.

Reply Parent Score: 2

vivainio Member since:
2008-12-26

Threads which are blocked should not consume any computational reasources...

But consider the situations where the threads are NOT blocked. If you have 5000 threads that are unblocked, you have 5000 context switches to do (and context switches are not free).

Reply Parent Score: 1