www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Communicating between vibe.d's worker tasks

reply =?UTF-8?B?Tm9yZGzDtnc=?= <per.nordlow gmail.com> writes:
I'm looking at

http://vibed.org/api/vibe.core.concurrency/makeIsolated

which is a great idea for safe inter-thread communication.

Are there any more usage examples for vibe's worker tasks that 
show how to send instances of `Isolated` to an existing such 
worker task via some low-latency (non-locking) channel-like 
communication structure?
Nov 23
next sibling parent =?UTF-8?B?Tm9yZGzDtnc=?= <per.nordlow gmail.com> writes:
On Thursday, 23 November 2017 at 10:15:26 UTC, Nordlöw wrote:
 I'm looking at

 http://vibed.org/api/vibe.core.concurrency/makeIsolated
Further, what does "weakly isolated" mean here http://vibed.org/api/vibe.core.core/runWorkerTask ?
Nov 23
prev sibling next sibling parent =?UTF-8?B?Tm9yZGzDtnc=?= <per.nordlow gmail.com> writes:
On Thursday, 23 November 2017 at 10:15:26 UTC, Nordlöw wrote:
 I'm looking at

 http://vibed.org/api/vibe.core.concurrency/makeIsolated

 which is a great idea for safe inter-thread communication.

 Are there any more usage examples for vibe's worker tasks that 
 show how to send instances of `Isolated` to an existing such 
 worker task via some low-latency (non-locking) channel-like 
 communication structure?
I guess http://vibed.org/api/vibe.core.concurrency/send void send(ARGS...) ( Task task, ARGS args ); void send(ARGS...) ( Tid tid, ARGS args ); is what I'm looking for. Why aren't `ARGS` restricted to be instances of `Isolated`? Further, shouldn't a trait `isIsolated` be defined and reused here and eventually moved into std.traits alongside `hasAliasing` and `hasIndirections`?
Nov 23
prev sibling parent Timoses <timosesu gmail.com> writes:
On Thursday, 23 November 2017 at 10:15:26 UTC, Nordlöw wrote:
 I'm looking at

 http://vibed.org/api/vibe.core.concurrency/makeIsolated

 which is a great idea for safe inter-thread communication.

 Are there any more usage examples for vibe's worker tasks that 
 show how to send instances of `Isolated` to an existing such 
 worker task via some low-latency (non-locking) channel-like 
 communication structure?
You might wanna search or as the question on these forums as well: vibe.d discussion - RejectedSoftware Forums http://forum.rejectedsoftware.com/groups/rejectedsoftware.vibed/
Nov 23