I wrote a test program that uses multiple sender and receiver threads that 
communicate via channels. The sender -> channel -> receiver chain is 1:1:1. 
However I want to store all threads and channels in tables, so that I can 
access any one of them by a key. This is to eventually build more complex code, 
where you can have more complex message flows.

Therefore I had to use ptrs for threads and channels. If the number of sender & 
receiver threads (and channels) is low, I don't hit an error easily. As soon as 
the count goes up exceptions start to happen. I've tested with ARC and ORC, 
which handle higher counts, but still see exceptions when the count is high 
enough (1,000 as in the uploaded example).

Here's the example code: 
<https://gist.github.com/jfilby/23471abeefb382547736918b6d44d438>

If anyone can tell me where I've gone wrong, please let me know. Thanks.

Reply via email to