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
On Monday, 23 April 2012 at 02:34:19 UTC, Ali Çehreli wrote:
This works at least with 2.059 on 64-bit Linux:
import std.stdio;
import std.concurrency;
import core.thread;
class Foo
{
int i;
}
void workerFunc(Tid owner)
{
receive(
(shared(Foo) foo) {
writeln(Before:
On 04/23/2012 11:44 AM, Casey wrote:
I actually did print out the value being passed successfully. It's just
that when I used the queue methods (enqueue and dequeue), it get this
error. The queue itself is shared, but none of the methods are expecting
a shared value nor do I believe they
On Monday, 23 April 2012 at 18:44:37 UTC, Casey wrote:
I actually did print out the value being passed successfully.
It's just that when I used the queue methods (enqueue and
dequeue), it get this error. The queue itself is shared, but
none of the methods are expecting a shared value nor
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
On 04/22/2012 07:15 PM, Casey wrote:
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