On 05/10/2014 06:28 PM, TheFlyingFiddle via Digitalmars-d-learn wrote:
On Friday, 9 May 2014 at 23:12:44 UTC, Charles Hixson via
Digitalmars-d-learn wrote:
But I'm worried about the receiving end. It needs, somehow, to ensure
that the message it receives is the appropriate message, and that
o
On Friday, 9 May 2014 at 23:12:44 UTC, Charles Hixson via
Digitalmars-d-learn wrote:
But I'm worried about the receiving end. It needs, somehow, to
ensure that the message it receives is the appropriate message,
and that other messages don't get dropped while it's waiting
for the answer...or
On 05/09/2014 02:51 PM, Joshua Niehus via Digitalmars-d-learn wrote:
Hi Charles,
would the following work (just a shot in the dark) ?
//---
module test;
import std.stdio;
import std.concurrency;
void spawnedFuncFoo(Tid tid, Tid tidBar) {
receive(
(int i) {
writeln("
Hi Charles,
would the following work (just a shot in the dark) ?
//---
module test;
import std.stdio;
import std.concurrency;
void spawnedFuncFoo(Tid tid, Tid tidBar) {
receive(
(int i) {
writeln("Foo Received the number ", i);
send(tidBar, i, thisTid);
The example code from core.sync.rwmutex seems bugged. After copying it
I added an import for core.sync.rwmutex, and moved the executions of
runTest into...well:
void main()
{runTest(ReadWriteMutex.Policy.PREFER_READERS);
runTest(ReadWriteMutex.Policy.PREFER_WRITERS);
}
Then I tried to