Message-Passing

Jacob Carlborg doob at me.com
Thu Jan 19 23:24:13 PST 2012


On 2012-01-19 21:58, Nathan M. Swan wrote:
> I want to applaud Sean Kelly and everyone who worked on std.concurrency
> for a great API, and wish that I could easily write Cocoa applications
> with it.
>
> I'm writing a screen recording program in Objective-C, and to make sure
> each frame has an equal length, I have two threads: one that takes the
> screenshot at certain intervals, the other that assembles it into a
> quicktime movie. After writing an implementation of a thread-safe queue,
> where the picture-taking thread adds and the assembling thread removes,
> I realized the huge similarity between what I'd done and std.concurrency.
>
> The std.concurrency module would have made hours of effort in ObjC take
> five minutes in D. Well done!

I don't know if it's the same but doesn't Objective-C makes that quite 
simple as well since Mac OS X 10.6 using grand central dispatch:

http://en.wikipedia.org/wiki/Grand_Central_Dispatch

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list