Re: Fiber and Thread Communication

2016-04-09 Thread Ali Çehreli via Digitalmars-d-learn
On 04/09/2016 07:45 AM, Nordlöw wrote: > On Friday, 8 April 2016 at 10:51:49 UTC, Nordlöw wrote: > AFAICT, it is not clear what are the limitations of the current > std.concurrency and, from what. An illustrating example on task-based > parallellism (such as the ones in jin.go) should partly

Re: Fiber and Thread Communication

2016-04-09 Thread Ali Çehreli via Digitalmars-d-learn
On 04/08/2016 02:42 PM, Dicebot wrote: >> Thanks Dicebot. I don't think the included >> std.concurrency.FiberScheduler has support for message passing because >> FiberScheduler.spawn does not return a Tid. If so, I don't see how >> it's possible to send messages between fibers. >> >> Ali > >

Re: Fiber and Thread Communication

2016-04-09 Thread Nordlöw via Digitalmars-d-learn
On Friday, 8 April 2016 at 10:51:49 UTC, Nordlöw wrote: Are there any plans to unite AFAICT, it is not clear what are the limitations of the current std.concurrency and, from what. An illustrating example on task-based parallellism (such as the ones in jin.go) should partly alleviate this

Re: Fiber and Thread Communication

2016-04-08 Thread Dicebot via Digitalmars-d-learn
On Friday, 8 April 2016 at 20:25:11 UTC, Ali Çehreli wrote: On 04/08/2016 01:16 PM, Dicebot wrote: On Friday, 8 April 2016 at 19:46:17 UTC, tcak wrote: On Friday, 8 April 2016 at 15:33:46 UTC, Dicebot wrote: On Friday, 8 April 2016 at 14:08:39 UTC, Nordlöw wrote: So a TId can represent

Re: Fiber and Thread Communication

2016-04-08 Thread Ali Çehreli via Digitalmars-d-learn
On 04/08/2016 01:16 PM, Dicebot wrote: On Friday, 8 April 2016 at 19:46:17 UTC, tcak wrote: On Friday, 8 April 2016 at 15:33:46 UTC, Dicebot wrote: On Friday, 8 April 2016 at 14:08:39 UTC, Nordlöw wrote: So a TId can represent either a thread or a fiber? AFAIR, yes (I haven't used

Re: Fiber and Thread Communication

2016-04-08 Thread Dicebot via Digitalmars-d-learn
On Friday, 8 April 2016 at 19:46:17 UTC, tcak wrote: On Friday, 8 April 2016 at 15:33:46 UTC, Dicebot wrote: On Friday, 8 April 2016 at 14:08:39 UTC, Nordlöw wrote: So a TId can represent either a thread or a fiber? AFAIR, yes (I haven't used std.concurrency in a long while, telling all

Re: Fiber and Thread Communication

2016-04-08 Thread tcak via Digitalmars-d-learn
On Friday, 8 April 2016 at 15:33:46 UTC, Dicebot wrote: On Friday, 8 April 2016 at 14:08:39 UTC, Nordlöw wrote: So a TId can represent either a thread or a fiber? AFAIR, yes (I haven't used std.concurrency in a long while, telling all from memory only). yes what? Thread or Fiber. ---

Re: Fiber and Thread Communication

2016-04-08 Thread Alex Parrill via Digitalmars-d-learn
On Friday, 8 April 2016 at 14:08:39 UTC, Nordlöw wrote: So a TId can represent either a thread or a fiber? It represents a "logical thread", which currently consists of coroutines or OS threads but could theoretically be extended to, say, other processes or even other machines.

Re: Fiber and Thread Communication

2016-04-08 Thread Dicebot via Digitalmars-d-learn
On Friday, 8 April 2016 at 14:08:39 UTC, Nordlöw wrote: So a TId can represent either a thread or a fiber? AFAIR, yes (I haven't used std.concurrency in a long while, telling all from memory only).

Re: Fiber and Thread Communication

2016-04-08 Thread Nordlöw via Digitalmars-d-learn
On Friday, 8 April 2016 at 13:15:07 UTC, Dicebot wrote: On Friday, 8 April 2016 at 11:18:11 UTC, Nordlöw wrote: On Friday, 8 April 2016 at 11:01:21 UTC, Dicebot wrote: Doesn't std.concurrency support both right now? I remember seeing PR that adds message box support to fibers ages ago. See

Re: Fiber and Thread Communication

2016-04-08 Thread Dicebot via Digitalmars-d-learn
On Friday, 8 April 2016 at 11:18:11 UTC, Nordlöw wrote: On Friday, 8 April 2016 at 11:01:21 UTC, Dicebot wrote: Doesn't std.concurrency support both right now? I remember seeing PR that adds message box support to fibers ages ago. See https://issues.dlang.org/show_bug.cgi?id=12090 and

Re: Fiber and Thread Communication

2016-04-08 Thread Nordlöw via Digitalmars-d-learn
On Friday, 8 April 2016 at 11:01:21 UTC, Dicebot wrote: Doesn't std.concurrency support both right now? I remember seeing PR that adds message box support to fibers ages ago. What progress has been since post: http://forum.dlang.org/post/k4jsef$26h6$1...@digitalmars.com

Re: Fiber and Thread Communication

2016-04-08 Thread Nordlöw via Digitalmars-d-learn
On Friday, 8 April 2016 at 11:01:21 UTC, Dicebot wrote: Doesn't std.concurrency support both right now? I remember seeing PR that adds message box support to fibers ages ago. 1. What functions provide message box communication? 2. But Fibers cannot currently be moved between threads right?

Re: Fiber and Thread Communication

2016-04-08 Thread Dicebot via Digitalmars-d-learn
On Friday, 8 April 2016 at 10:51:49 UTC, Nordlöw wrote: Are there any plans to unite fiber-to-fiber communication with thread-to-thread communication in Phobos? Does vibe.d give any solutions here? Doesn't std.concurrency support both right now? I remember seeing PR that adds message box

Fiber and Thread Communication

2016-04-08 Thread Nordlöw via Digitalmars-d-learn
Are there any plans to unite fiber-to-fiber communication with thread-to-thread communication in Phobos? Does vibe.d give any solutions here?