www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Fiber Concurrency Showcase

reply =?UTF-8?B?Tm9yZGzDtnc=?= <per.nordlow gmail.com> writes:
I would like to experiment with Fibers/Coroutines in D/vibe.d.

I'm missing a code example in std.concurrency that highlights an 
example of using Fibers for massive concurrency. Could anybody 
show me such a code example or link to a more descriptive 
tutorial?
Sep 13 2016
next sibling parent reply Andrea Fontana <nospam example.com> writes:
On Tuesday, 13 September 2016 at 09:46:46 UTC, Nordlöw wrote:
 I would like to experiment with Fibers/Coroutines in D/vibe.d.

 I'm missing a code example in std.concurrency that highlights 
 an example of using Fibers for massive concurrency. Could 
 anybody show me such a code example or link to a more 
 descriptive tutorial?
Check this: http://ddili.org/ders/d.en/fibers.html Andrea
Sep 13 2016
next sibling parent Marc =?UTF-8?B?U2Now7x0eg==?= <schuetzm gmx.net> writes:
On Tuesday, 13 September 2016 at 10:02:28 UTC, Andrea Fontana 
wrote:
 On Tuesday, 13 September 2016 at 09:46:46 UTC, Nordlöw wrote:
 I would like to experiment with Fibers/Coroutines in D/vibe.d.

 I'm missing a code example in std.concurrency that highlights 
 an example of using Fibers for massive concurrency. Could 
 anybody show me such a code example or link to a more 
 descriptive tutorial?
Check this: http://ddili.org/ders/d.en/fibers.html Andrea
Ha! Should have refreshed the page before replying :-P
Sep 13 2016
prev sibling next sibling parent =?UTF-8?B?Tm9yZGzDtnc=?= <per.nordlow gmail.com> writes:
On Tuesday, 13 September 2016 at 10:02:28 UTC, Andrea Fontana 
wrote:
 Check this:
 http://ddili.org/ders/d.en/fibers.html
Thanks! I would like to make use of message passing between Fibers aswell. Any code example for this? Specifically: Should the call to `new Fiber()` take all the TId's of its communication neighbourds be passed as argument to the `Fiber` constructor?
Sep 13 2016
prev sibling parent =?UTF-8?B?Tm9yZGzDtnc=?= <per.nordlow gmail.com> writes:
On Tuesday, 13 September 2016 at 10:02:28 UTC, Andrea Fontana 
wrote:
 Check this:
 http://ddili.org/ders/d.en/fibers.html
Further, are we forced to use the GC for Fiber allocation or can a sub-class of Fiber implement its own allocation strategy?
Sep 13 2016
prev sibling parent Marc =?UTF-8?B?U2Now7x0eg==?= <schuetzm gmx.net> writes:
On Tuesday, 13 September 2016 at 09:46:46 UTC, Nordlöw wrote:
 I would like to experiment with Fibers/Coroutines in D/vibe.d.

 I'm missing a code example in std.concurrency that highlights 
 an example of using Fibers for massive concurrency. Could 
 anybody show me such a code example or link to a more 
 descriptive tutorial?
Ali has an asynchronous I/O example in the Fibers chapter of his book: http://ddili.org/ders/d.en/fibers.html
Sep 13 2016