Re: Pass Tid[string] to another thread (by send)

2016-08-05 Thread TencoDK via Digitalmars-d-learn
On Friday, 5 August 2016 at 13:14:41 UTC, Kagamin wrote: Bug 6585 is not fixed. Variant wasn't written for shared and immutable types. As a workaround wrap the array in a class. Thanks! It worked. Though it's strange that Variant wasn't written for shared and immutable types because, for

Re: Pass Tid[string] to another thread (by send)

2016-08-05 Thread Kagamin via Digitalmars-d-learn
Bug 6585 is not fixed. Variant wasn't written for shared and immutable types. As a workaround wrap the array in a class.

Pass Tid[string] to another thread (by send)

2016-08-04 Thread TencoDK via Digitalmars-d-learn
Hi! I'm trying to make threads communicate by sending an immutable address book to each thread. Code: Tid[string] addressBook; addressBook["Some"] = sdfsdf; addressBook["Input"] = sdfsdf; auto sharedAddressBook = cast(immutable(Tid[string]))(addressBook); send(tid, sharedAddressBook);