SFML community forums

General => General discussions => Topic started by: TheRabbit on November 11, 2013, 07:35:18 am

Title: Converted server to running multithreaded today
Post by: TheRabbit on November 11, 2013, 07:35:18 am
Sorry, I just wanted to brag really quick because there's nobody that I can show this to that would care, but I spent all day today converting my server software to run multithreaded and not break or explode.

(http://i.imgur.com/GhCKDQRl.png)

There was a lot of frustration at the end, every time my thread returned it would cause a debug error. I had forgotten to .detach the threads and so they were disappearing and throwing exceptions. But now it all works! Time to make the rest of the server functions threaded!
Title: Re: Converted server to running multithreaded today
Post by: eXpl0it3r on November 11, 2013, 09:12:06 am
Congrats! :)

Now for round two and three: Getting rid of all the hidden race conditions and make your server as secure as possible! ;D
Title: Re: Converted server to running multithreaded today
Post by: TheRabbit on November 11, 2013, 06:20:01 pm
Congrats! :)

Now for round two and three: Getting rid of all the hidden race conditions and make your server as secure as possible! ;D
Yep, I have one race where the threads try and latch the incoming connection, those 2 incoming connections spawned like 11 threads. I'm thinking I'll lock the main thread from continuing until the connection is latched.