Re: Concurrency in D

2012-06-29 Thread Dejan Lekic
On Thu, 28 Jun 2012 00:34:50 +0200, Minas Mina wrote: I have been playing latetly with std.concurrency and core.thread. I like both, but they are entirely different approaches to concurrency. std.concurrency: Uses message passing. Does not allow passing of mutable types. core.thread:

Re: Concurrency in D

2012-06-28 Thread Minas Mina
On Wednesday, 27 June 2012 at 23:50:17 UTC, Ali Çehreli wrote: On 06/27/2012 04:05 PM, Adam Burton wrote: For example I would like to have a thread calculate the sum of the first half of an array while another thread would calculate the other half, and I could add the two results at the

Re: Concurrency in D

2012-06-28 Thread maarten van damme
yeah, I didn't knew std.parallelism was so easy to use. Speed up was really big for minimal effort.

Concurrency in D

2012-06-27 Thread Minas Mina
I have been playing latetly with std.concurrency and core.thread. I like both, but they are entirely different approaches to concurrency. std.concurrency: Uses message passing. Does not allow passing of mutable types. core.thread: Essentially the same as the approach taken by Java. 1) Is

Re: Concurrency in D

2012-06-27 Thread Adam Burton
Minas Mina wrote: I have been playing latetly with std.concurrency and core.thread. I like both, but they are entirely different approaches to concurrency. std.concurrency: Uses message passing. Does not allow passing of mutable types. core.thread: Essentially the same as the approach

Re: Concurrency in D

2012-06-27 Thread Justin Whear
On Thu, 28 Jun 2012 00:34:50 +0200, Minas Mina wrote: I have been playing latetly with std.concurrency and core.thread. I like both, but they are entirely different approaches to concurrency. std.concurrency: Uses message passing. Does not allow passing of mutable types. core.thread:

Re: Concurrency in D

2012-06-27 Thread Nathan M. Swan
On Wednesday, 27 June 2012 at 22:34:51 UTC, Minas Mina wrote: I have been playing latetly with std.concurrency and core.thread. I like both, but they are entirely different approaches to concurrency. Aren't they great? ;) std.concurrency: Uses message passing. Does not allow passing of

Re: Concurrency in D

2012-06-27 Thread Ali Çehreli
On 06/27/2012 04:05 PM, Adam Burton wrote: For example I would like to have a thread calculate the sum of the first half of an array while another thread would calculate the other half, and I could add the two results at the end. For this task there is another concurrency module called

Re: Concurrency in D

2012-06-27 Thread Minas Mina
You all helped, thank you :) I will read the concurrency part tomorrow!