RejectedSoftware Forums

Sign up

Connection between tasks

Is there a simple way to pass a data (string for example) from one task to another task? I found vibe.core.signal module. It looks like core.sync.condition of Phobos, but anyway I can't understand how to use it. Would you please give a basic example?

Re: Connection between tasks

On Fri, 26 Apr 2013 17:10:56 GMT, Jack Applegame wrote:

Is there a simple way to pass a data (string for example) from one task to another task? I found vibe.core.signal module. It looks like core.sync.condition of Phobos, but anyway I can't understand how to use it. Would you please give a basic example?

The git master version (I'll also put out a new release shortly) has a new module vibe.core.concurrency which includes a message passing interface that is API compatible to std.concurrency. There is also a simple example (in "examples/message"), but the Phobos documentation should apply as well in most cases.

The Signal class in vibe.core.signal is now named ManualEvent to avoid confusion with other kinds of signals (e.g. std.signals.Signal). It is mostly a low level synchronization primitive and not directly useful for passing data (there is also TaskCondition, which is a slightly higher level synchronization primitive that works like a core.sync.condition.Condition and is usually better than using ManualEvent directly).

Re: Connection between tasks

On Fri, 26 Apr 2013 18:05:55 GMT, Sönke Ludwig wrote:

The git master version (I'll also put out a new release shortly) has a new module vibe.core.concurrency which includes a message passing interface that is API compatible to std.concurrency. There is also a simple example (in "examples/message"), but the Phobos documentation should apply as well in most cases.

Great! Something like std.concurrency is exactly what I need.

How to donate your project?

Re: Connection between tasks

On Fri, 26 Apr 2013 19:49:31 GMT, Jack Applegame wrote:

How to donate your project?

Thanks for asking. I haven't put any thoughts into donations so far (I'm worried a bit about book keeping and tax regulations and asking a tax adviser would surely eat up all of the donations in the first place). So for now there is no way...

By the way, v0.7.15 was just released.