Communicating between vibe.d's worker tasks
Nordlöw
per.nordlow at gmail.com
Thu Nov 23 10:52:00 UTC 2017
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`?
More information about the Digitalmars-d-learn
mailing list