Dne 25.9.2012 18:19, Jacob Carlborg napsal(a):
BTW, why do you need to use std.currency at all if it's immutable, just
share it as a global. The whole point of immutable is that it can be
freely shared among threads without any risks.
It is not some single piece of data.
I have a queue of task
On 2012-09-21 16:33, Martin Drasar wrote:
Hi,
I am using the std.concurrency module and I would like to send an
associative array to another thread.
If I try this:
string[string] aa;
someThread.send(aa);
I get: Aliases to mutable thread-local data not allowed.
And if I try to use this:
immu
On 2012-09-25 00:47, Sean Kelly wrote:
If you're passing via std.concurrency then you'll currently have to cast to
shared. I'd been considering allowing Unique!T to be sent as well, but haven't
done so yet.
Hey, if it's immutable why use std.concurrency at all? Just import the
module and u
On Sep 22, 2012, at 2:24 AM, Martin Drasar wrote:
> On 21.9.2012 19:01, Jacob Carlborg wrote:
>> Perhaps declaring the associative array as "shared". An alternative
>> would be to serialize the aa, pass it to another thread, and deserialize
>> it. That would though create a copy.
>
> Hi Jacob,
>
On 2012-09-22 13:50, Johannes Pfau wrote:
1. Declare it as "shared"
There's also __gshared.
Yeah, forgot about that one.
--
/Jacob Carlborg
On 22.9.2012 13:50, Johannes Pfau wrote:
>> 1. Declare it as "shared"
> There's also __gshared.
Yup, that works.
Thanks
Am Sat, 22 Sep 2012 12:30:30 +0200
schrieb Jacob Carlborg :
> On 2012-09-22 11:24, Martin Drasar wrote:
>
> > thanks for the hint. Making it shared sounds a bit fishy to me. My
> > intention is to pass some read only data, that are in fact thread
> > local and there is no real need to make them s
On 22.9.2012 13:19, Jonathan M Davis wrote:
> The problem with immutable is probably due to this bug:
>
> http://d.puremagic.com/issues/show_bug.cgi?id=5538
>
> And casting to shared probably won't work due to this bug:
>
> http://d.puremagic.com/issues/show_bug.cgi?id=6585
>
> std.variant need
On Saturday, September 22, 2012 12:30:30 Jacob Carlborg wrote:
> Looking at your original example I don't understand why the immutable aa
> won't work. That's the whole point of immutable, it's safe to share
> among threads. It's probably a bug somewhere. I think someone else can
> answer these que
On 2012-09-22 11:24, Martin Drasar wrote:
thanks for the hint. Making it shared sounds a bit fishy to me. My
intention is to pass some read only data, that are in fact thread local
and there is no real need to make them shared.
The whole point of thread local data is that it's only accessible
On 21.9.2012 19:01, Jacob Carlborg wrote:
> Perhaps declaring the associative array as "shared". An alternative
> would be to serialize the aa, pass it to another thread, and deserialize
> it. That would though create a copy.
Hi Jacob,
thanks for the hint. Making it shared sounds a bit fishy to m
On 2012-09-21 16:33, Martin Drasar wrote:
Hi,
I am using the std.concurrency module and I would like to send an
associative array to another thread.
If I try this:
string[string] aa;
someThread.send(aa);
I get: Aliases to mutable thread-local data not allowed.
And if I try to use this:
immu
12 matches
Mail list logo