ChezZ
Creating a thread that lives for as long as the application.
I wrote a server using a c library, I created two threads using and have an infinite loop running in the threads method. One thread handles all socket related code, and adds incoming packets to be deserialized to a single producer single consumer queue. The other thread deserializes the packets. The codes works but it has a flaw. Creating the thread via fails and I get an exception if the system running the app has no more threads available. is it possible to tell the app use an existing thread if creating a new one fails:
18 replies