digitalmars.D.learn - std.concurrency.thisTid.send() feat. immutable(struct with several
- Alexandr Druzhinin (5/5) Feb 26 2013 This code doesn't compiles http://dpaste.dzfl.pl/706a0d12
- Alexandr Druzhinin (6/11) Feb 26 2013 I've done it using pointer to the structure
- Jonathan M Davis (13/18) Feb 26 2013 I don't exactly what's going on with your code here, but std.concurrency...
- Alexandr Druzhinin (3/21) Feb 27 2013 Thank you.
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?
Feb 26 2013
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
Feb 26 2013
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
Feb 26 2013
27.02.2013 14:19, Jonathan M Davis пишет:On Wednesday, February 27, 2013 13:19:22 Alexandr Druzhinin wrote:Thank you. I will learn to use reported issues.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
Feb 27 2013