Thread overview | ||||||
---|---|---|---|---|---|---|
|
February 27, 2013 std.concurrency.thisTid.send() feat. immutable(struct with several arrays) | ||||
---|---|---|---|---|
| ||||
This code doesn't compiles http://dpaste.dzfl.pl/706a0d12 But if you comment one of arrays it will do. I take a look at varaint.d but can't understand why two arrays cause this error. How can I send immutable struct that contains two or more arrays without any serializing? |
February 27, 2013 Re: std.concurrency.thisTid.send() feat. immutable(struct with several arrays) | ||||
---|---|---|---|---|
| ||||
Posted in reply to Alexandr Druzhinin | 27.02.2013 13:19, Alexandr Druzhinin пишет:
> This code doesn't compiles http://dpaste.dzfl.pl/706a0d12
> But if you comment one of arrays it will do. I take a look at varaint.d
> but can't understand why two arrays cause this error.
> How can I send immutable struct that contains two or more arrays without
> any serializing?
I've done it using pointer to the structure
thisTid.send(&test_var);
but using pointers isn't good practice and if somebody explain the reason of compiler complaining it would be great.
thank in advance
|
February 27, 2013 Re: std.concurrency.thisTid.send() feat. immutable(struct with several arrays) | ||||
---|---|---|---|---|
| ||||
Posted in reply to Alexandr Druzhinin | On Wednesday, February 27, 2013 13:19:22 Alexandr Druzhinin wrote: > This code doesn't compiles http://dpaste.dzfl.pl/706a0d12 > But if you comment one of arrays it will do. I take a look at varaint.d > but can't understand why two arrays cause this error. > How can I send immutable struct that contains two or more arrays without > any serializing? I don't exactly what's going on with your code here, but std.concurrency is very buggy with regards to what types it will and won't accept - including both immutable and arrays. These are just some of the reported issues: http://d.puremagic.com/issues/show_bug.cgi?id=6585 http://d.puremagic.com/issues/show_bug.cgi?id=5538 http://d.puremagic.com/issues/show_bug.cgi?id=8853 http://d.puremagic.com/issues/show_bug.cgi?id=9122 Your problem may be one of those. std.concurrency is fantastic as far as its basic design goes, but its implementation still needs a fair bit of work. It generally works, but it's fairly easy to find corner cases where it doesn't work. - Jonathan M Davis |
February 27, 2013 Re: std.concurrency.thisTid.send() feat. immutable(struct with several arrays) | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jonathan M Davis | 27.02.2013 14:19, Jonathan M Davis пишет:
> On Wednesday, February 27, 2013 13:19:22 Alexandr Druzhinin wrote:
>> This code doesn't compiles http://dpaste.dzfl.pl/706a0d12
>> But if you comment one of arrays it will do. I take a look at varaint.d
>> but can't understand why two arrays cause this error.
>> How can I send immutable struct that contains two or more arrays without
>> any serializing?
>
> I don't exactly what's going on with your code here, but std.concurrency is
> very buggy with regards to what types it will and won't accept - including
> both immutable and arrays. These are just some of the reported issues:
>
> http://d.puremagic.com/issues/show_bug.cgi?id=6585
> http://d.puremagic.com/issues/show_bug.cgi?id=5538
> http://d.puremagic.com/issues/show_bug.cgi?id=8853
> http://d.puremagic.com/issues/show_bug.cgi?id=9122
>
> Your problem may be one of those.
>
> std.concurrency is fantastic as far as its basic design goes, but its
> implementation still needs a fair bit of work. It generally works, but it's
> fairly easy to find corner cases where it doesn't work.
>
> - Jonathan M Davis
>
Thank you.
I will learn to use reported issues.
|
Copyright © 1999-2021 by the D Language Foundation