Issue calling methods using std.concurrency

Casey sybrandy at gmail.com
Sun Apr 22 19:15:11 PDT 2012


Hello,

I'm getting some errors when I wrap a struct that I've written 
with another struct.  Here are the errors I'm getting:

tqueue.d(14): Error: function queue.Queue!(int).Queue.enqueue 
(int value) is not
  callable using argument types (int) shared
tqueue.d(15): Error: function queue.Queue!(int).Queue.dequeue () 
is not callable
  using argument types ()

Here's the receive block which the issue:

receive(
     (T value) { queue.enqueue(value); },
     (Tid caller) { send(caller, queue.dequeue); }
);

The queue itself is shared.  Outside of that, nothing special 
going on.  I just have a class that I want to be able to in a 
concurrent environment without having to modify the original 
class.

Any thoughts?


More information about the Digitalmars-d-learn mailing list