Threading / Concurrency Problem
Bauss
streetzproductionz at hotmail.com
Wed Oct 23 04:51:33 PDT 2013
Working on a 2nd simple webserver in D. However I am facing a
problem with some threading. I want the receiving of connections
to happen in a 2nd thread, but after adding the connections to
the collection it seems like the receive thread never loops
through them, as if no connections were ever added. However I
have checked and it is added.
The thread for receiving is also working as I have checked if
code outside of the foreach loop works and it does, so it's
probably a problem with the collection.
This makes me assume it's a concurrency issue and I'm not sure
how to fix it.
I'm using an associative array for the connections. Class[int] is
the format I'm using.
You can view my code here:
If anyone knows the solution to this, it would be appreciated. I
can't seem to figure it out.
Code:
http://pastebin.com/A61NPWUq
More information about the Digitalmars-d-learn
mailing list