in reply to creating thread : are parameter objects passed via reference ?

If you want to share data between threads (without copying), then mark it :shared using threads::shared.

If you want to share it, say you want to share it. Simples!

If you want to to have unshared data in one thread, but not in another thread, create the thread before you read in or otherwise populate that data. Simples too!.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
RIP PCW
  • Comment on Re: creating thread : are parameter objects passed via reference ?
  • Download Code