Issue calling methods using std.concurrency

Casey sybrandy at gmail.com
Wed Apr 25 09:10:43 PDT 2012


Stanislav: I think you just hit the nail on the head with the 
shared reference to this.  I didn't even think of that as the 
error message made me think of the parameter being shared.

As for solving it, I'll have to think about it.  I was hoping to 
just have a single queue class (Or any other in the future) that 
worked well single-threaded, but could be used in a 
multi-threaded environment if I used std.concurrency properly.  
Essentially, my goal was to have only a single queue, but use 
message passing to enqueue/dequeue items from the queue without 
having to create a custom thread-safe queue class.

Well, I guess I have to rethink what I'm doing.  Thanks!


More information about the Digitalmars-d-learn mailing list