Walter: any plan to add support for yield/return Iterators/generators?

Marcio mqmnews123 at sglebs.com
Tue Sep 5 09:32:14 PDT 2006


Mikola Lysenko wrote:
> You may be interested in a library I wrote some time ago for D known as 
> StackThreads.  It solves exactly this problem.  You can get it from my 
> website at www.assertfalse.com .


	Neat, thanks. I had seen your post before already. But I want to 
leverage multi core etc. CCR actually does this really well. Also, the 
yield return in generators are not the same as the yield in coroutines. 
They are much higher level to the end user.

	Also: do you use a stack or the heap? It was not clear from the FAQ, 
although the delegate example suggests you rely on 1 thread and 
therefore its stack. One of the problems with threads is that you pay 
the price of a stack in advance, instead of as you go (N threads means N 
stacks sparsely used). Contrast this with Stackless Python for example, 
which uses continuation passing & the heap. If I understood your FAQ, 
you use 1 Thread so just 1 stack, but on the other hand you can't 
leverage multi core because of that.

marcio




More information about the Digitalmars-d mailing list