Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Converted server to running multithreaded today  (Read 2351 times)

0 Members and 1 Guest are viewing this topic.

TheRabbit

  • Newbie
  • *
  • Posts: 26
    • View Profile
Converted server to running multithreaded today
« 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.



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!

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: Converted server to running multithreaded today
« Reply #1 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
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

TheRabbit

  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: Converted server to running multithreaded today
« Reply #2 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.