std.concurrency.spawn does not accept delegates

teo teo.ubuntu at yahoo.com
Mon Jul 18 08:55:52 PDT 2011


On Mon, 18 Jul 2011 10:26:27 -0400, Steven Schveighoffer wrote:

> On Sun, 17 Jul 2011 15:29:02 -0400, teo <teo.ubuntu at yahoo.com> wrote:
> 
>> It looks like std.concurrency.spawn does not accept delegates. Is there
>> any reason for that?
> 
> There is no type attached to the hidden 'this' pointer.  So spawn cannot
> guarantee it doesn't point to unshared data.
> 
> -Steve

Bad. I tried to pass as an argument a pointer to an instance of a class - 
a this pointer. That didn't work.


More information about the Digitalmars-d-learn mailing list