The future of concurrent programming

Daniel Keep daniel.keep.lists at gmail.com
Wed May 30 19:47:33 PDT 2007



David B. Held wrote:
> ...
> Fibers are nice when you don't need pre-emption, but having to think
> about pre-emption makes the parallelism intrude on your problem-solving,
> which is what we would like to avoid.
> 
> Dave

Have you seen Stackless Python?  That uses cooperative multithreading,
but I've never had to write an explicit yield.

The way that works is that you do all communication, and all blocking
actions via channels.  The channels transfer control of the CPU as well
as data, meaning that you don't really need to think about what's going
on behind the scenes.  It all just kinda works.

One of these days, I'll get around to doing stackless in D...

	-- Daniel

-- 
int getRandomNumber()
{
    return 4; // chosen by fair dice roll.
              // guaranteed to be random.
}

http://xkcd.com/

v2sw5+8Yhw5ln4+5pr6OFPma8u6+7Lw4Tm6+7l6+7D
i28a2Xs3MSr2e4/6+7t4TNSMb6HTOp5en5g6RAHCP  http://hackerkey.com/



More information about the Digitalmars-d mailing list