digitalmars.D.learn - fibers/coroutines tutorial?
- Hasan (5/5) Jan 24 2014 Is there a quick tutorial/intro for what D offers as an
- Dejan Lekic (4/9) Jan 24 2014 Yes, and it is listed on http://wiki.dlang.org . Please go to
- Dicebot (4/9) Jan 24 2014 Well if you really want to skip everything and go straight to
- Russel Winder (20/26) Jan 24 2014 Now that is just bad research ;-)
Is there a quick tutorial/intro for what D offers as an equivalent or alternative to "goroutines"? I've seen the concurrency link on the homepage .. and umm .. call me lazy but I don't feel like reading through all that just to see what D's alternative to goroutines looks like ..
Jan 24 2014
On Friday, 24 January 2014 at 16:02:27 UTC, Hasan wrote:Is there a quick tutorial/intro for what D offers as an equivalent or alternative to "goroutines"? I've seen the concurrency link on the homepage .. and umm .. call me lazy but I don't feel like reading through all that just to see what D's alternative to goroutines looks like ..Yes, and it is listed on http://wiki.dlang.org . Please go to articles/tutorials part of that web-site and enjoy really good reads.
Jan 24 2014
On Friday, 24 January 2014 at 16:02:27 UTC, Hasan wrote:Is there a quick tutorial/intro for what D offers as an equivalent or alternative to "goroutines"? I've seen the concurrency link on the homepage .. and umm .. call me lazy but I don't feel like reading through all that just to see what D's alternative to goroutines looks like ..Well if you really want to skip everything and go straight to code, it is all about fibers :
Jan 24 2014
On Fri, 2014-01-24 at 16:02 +0000, Hasan wrote:Is there a quick tutorial/intro for what D offers as an equivalent or alternative to "goroutines"? I've seen the concurrency link on the homepage .. and umm .. call me lazy but I don't feel like reading through all that just to see what D's alternative to goroutines looks like ..Now that is just bad research ;-) As far as I am aware D has no equivalent of Go's goroutines per se. A goroutine is (well should be) a process with no access to any global shared memory, with channels with which to communicate to other goroutines. Effectively Go realizes Communicating Sequential Processes (CSP), not 1978 style, but about 2009 style. D's built-in concurrency/parallelism supports is much more akin to actors. D would be improved by having a realization of CSP to augment what it already has. For now though you would have to build a CSP-style system over the actor-style system, though this would have inefficiencies. The problem will be how to realize the select operation. For now the only realizations of CSP that I am aware of that are usable are Go, PyCSP, PythonCSP, JCSP, GroovyCSP, C++CSP2. -- Russel. ============================================================================= Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder ekiga.net 41 Buckmaster Road m: +44 7770 465 077 xmpp: russel winder.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
Jan 24 2014