Re: std.concurrency and immutable

2013-11-26 Thread Jesse Phillips
On Monday, 25 November 2013 at 20:55:18 UTC, Antoche wrote: Thanks for the suggestion. My problem with casting is that it results in undefined behaviour, Casting is defined, modifications afterwards are not. Finally, can anyone explained why the scope(failure) is reached? Looking at the stack

Re: std.concurrency and immutable

2013-11-26 Thread Dicebot
By the way this works: import std.stdio; import std.concurrency; class A { this() immutable {} // this line string toString() const { return "aaa"; } } But it will still fail if you try to receive by class type explicitly instead of Variant. std.parallelism is much more mature

Re: std.concurrency and immutable

2013-11-26 Thread Dicebot
On Monday, 25 November 2013 at 23:00:41 UTC, Shammah Chancellor wrote: On 2013-11-25 14:08:53 +, Dicebot said: Sending immutable classes currently does not work because of https://d.puremagic.com/issues/show_bug.cgi?id=7069 (and has never worked despite being intended). Can you send immu

Re: std.concurrency and immutable

2013-11-26 Thread Shammah Chancellor
On 2013-11-25 20:55:15 +, Antoche said: On Monday, 25 November 2013 at 11:48:06 UTC, Shammah Chancellor wrote: On 2013-11-25 06:03:27 +, Antoche said: The following code compiles but doesn't work as expected: import std.stdio; import std.concurrency; class A { this() immutable {} }

Re: std.concurrency and immutable

2013-11-25 Thread Shammah Chancellor
On 2013-11-25 14:08:53 +, Dicebot said: Sending immutable classes currently does not work because of https://d.puremagic.com/issues/show_bug.cgi?id=7069 (and has never worked despite being intended). Can you send immutable struct references?

Re: std.concurrency and immutable

2013-11-25 Thread Antoche
On Monday, 25 November 2013 at 11:48:06 UTC, Shammah Chancellor wrote: On 2013-11-25 06:03:27 +, Antoche said: The following code compiles but doesn't work as expected: import std.stdio; import std.concurrency; class A { this() immutable {} } void m

Re: std.concurrency and immutable

2013-11-25 Thread Dicebot
Sending immutable classes currently does not work because of https://d.puremagic.com/issues/show_bug.cgi?id=7069 (and has never worked despite being intended).

Re: std.concurrency and immutable

2013-11-25 Thread Shammah Chancellor
On 2013-11-25 06:03:27 +, Antoche said: The following code compiles but doesn't work as expected: import std.stdio; import std.concurrency; class A { this() immutable {} } void main() { auto tid = spawn( &fooBar, thisTid );

std.concurrency and immutable

2013-11-24 Thread Antoche
The following code compiles but doesn't work as expected: import std.stdio; import std.concurrency; class A { this() immutable {} } void main() { auto tid = spawn( &fooBar, thisTid ); while(true) { receive(