I have an application where a long-lived "loader" thread takes
messages to load data, loads that data, and then sends it back to
the main thread via the standard concurrency primitives.
Something like this:
void threadFunc(Tid ownerTid)
{
while(true)
{
receive(
(in
On Sunday, 23 April 2017 at 20:30:33 UTC, Kevin Balbas wrote:
I have an application where a long-lived "loader" thread takes
messages to load data, loads that data, and then sends it back
to the main thread via the standard concurrency primitives.
Something like this:
void threadFunc(Tid own
On Sunday, 23 April 2017 at 20:33:48 UTC, Kevin Balbas wrote:
I guess the follow up here is: Is this the correct way to do
it?
cast to shared, send to main thread, cast away shared?
At the moment, pretty much yes. Either that or make the
(unnecessary) immutable copies.
There are no ownersh
On Sunday, 23 April 2017 at 20:33:48 UTC, Kevin Balbas wrote:
Is this the correct way to do it?
cast to shared, send to main thread, cast away shared?
Yes, as long as the thing is unique, you can cast it to shared or
immutable just fine.