Re: Concurrency send immutable

2017-11-24 Thread SrMordred via Digitalmars-d-learn
Nice, thank you!

Re: Concurrency send immutable

2017-11-24 Thread drug via Digitalmars-d-learn
24.11.2017 15:53, SrMordred пишет: On Friday, 24 November 2017 at 12:36:42 UTC, Daniel Kozak wrote: Should print something like this: std.concurrency.OwnerTerminated@std/concurrency.d(223): Owner terminated Yes, it was, I was aware of this and put some sleep after that too. (immutable (int)[

Re: Concurrency send immutable

2017-11-24 Thread SrMordred via Digitalmars-d-learn
On Friday, 24 November 2017 at 12:36:42 UTC, Daniel Kozak wrote: Should print something like this: std.concurrency.OwnerTerminated@std/concurrency.d(223): Owner terminated Yes, it was, I was aware of this and put some sleep after that too. (immutable (int)[] v) OK that parenteshis was th

Re: Concurrency send immutable

2017-11-24 Thread Daniel Kozak via Digitalmars-d-learn
import std.stdio; import std.traits; int main(string[] args) { immutable int[] arr = [1,2,3,4,5]; writeln(ImplicitConversionTargets!(typeof(arr)).stringof); return 0; } On Fri, Nov 24, 2017 at 1:36 PM, Daniel Kozak wrote: > Should print something like this: > std.concurrency.OwnerTerminated@std

Re: Concurrency send immutable

2017-11-24 Thread Daniel Kozak via Digitalmars-d-learn
Should print something like this: std.concurrency.OwnerTerminated@std/concurrency.d(223): Owner terminated Because main thread is terminated, because types do not match this will work import std.stdio; import std.concurrency; void fun() { receive( (immutable (int)[] v) => writeln(v) ); } int ma

Re: Concurrency send immutable

2017-11-24 Thread SrMordred via Digitalmars-d-learn
On Friday, 24 November 2017 at 12:05:16 UTC, SrMordred wrote: immutable int[] arr = [1,2,3,4,5]; auto t = spawn({ receive( (immutable int[] v) => writeln(v) );}); t.send(arr); whats the problem here? Nothing prints out