[dmd-concurrency] std.concurrency
Igor Lesik
curoles at yahoo.com
Tue Feb 23 05:00:03 PST 2010
I tried your code with removed dynamic allocation on thisTid(), Tid is "alias TID* Tid" where TID is the structure. Interesting that "delete tid" where tid is returned from spawn or thisTid does not actually destroy the structure and thisTid returns correct address, so there is nothing to be afraid of. Do I miss something?
Here is my version:
http://www.curoles.com/j/concurrency.d
----- Original Message ----
From: Sean Kelly <sean at invisibleduck.org>
To: Discuss the concurrency model(s) for D <dmd-concurrency at puremagic.com>
Sent: Mon, February 22, 2010 11:40:59 AM
Subject: Re: [dmd-concurrency] std.concurrency
Here's the module:
http://www.invisibleduck.org/sean/src/concurrency.d
It just has send and receive so far, but those are tested and work correctly. For the moment, Tid is a struct and Cid doesn't exist. I'd like to try and keep Tid and Cid as structs if possible to avoid the need for dynamic allocation when thisTid() is called (using a single shared Tid instance isn't really safe since it could be deleted by the user). Most importantly, this still doesn't work:
receive( (int a) {}, (string b) {} );
The compiler still "sticks" on the type of the first delegate in the foreach expansion and errors during compilation. Once this is fixed I'll add checking for overload conflicts in the receive set, etc.
On Feb 21, 2010, at 1:43 PM, Igor Lesik wrote:
> Sean, just in case, I put my stuff here:
> http://www.curoles.com/j/dstdconcur.html
>
> Get better.
>
>
>
> ----- Original Message ----
> From: Sean Kelly <sean at invisibleduck.org>
> To: Discuss the concurrency model(s) for D <dmd-concurrency at puremagic.com>
> Sent: Sun, February 21, 2010 1:19:18 PM
> Subject: Re: [dmd-concurrency] std.concurrency
>
> On Feb 21, 2010, at 10:52 AM, Andrei Alexandrescu wrote:
>
>> Igor Lesik wrote:
>>> Good. Then I will stop working on it.
>>
>> Just until you coordinate with Sean. I'm sure your contribution would add a lot of value. Also, don't forget - new ideas are always appreciated!
>
> Definitely. I've been out sick recently but will be back in commission tomorrow. I'll try and shape up the module then.
>
>
>
>
> _______________________________________________
> dmd-concurrency mailing list
> dmd-concurrency at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/dmd-concurrency
_______________________________________________
dmd-concurrency mailing list
dmd-concurrency at puremagic.com
http://lists.puremagic.com/mailman/listinfo/dmd-concurrency
More information about the dmd-concurrency
mailing list