Forum Multiplayer Is server code multi-threaded?

Discussion and help relating to the PlayerIO Multiplayer API.

Is server code multi-threaded?

Postby pixilestudios » January 13th, 2018, 12:23 pm

Just checking in to make sure before I add a bunch of locks... are the server callbacks/timers still multi-threaded? I read posts from a few years ago that said it is... but I also read that there were plans to make it have a single-threaded option. However, there wasn't any mention of multi-threading in the documentation nor in the example code. Thanks.
pixilestudios
 
Posts: 1
Joined: January 9th, 2018, 9:46 am

Re: Is server code multi-threaded?

Postby Henrik » February 13th, 2018, 8:01 pm

Hey pixile,

Yes, all multiplayer code is multithreaded. It's event-based, so every new received message, every timer, and every callback happens in its own thread. effectively.
Henrik
.IO
 
Posts: 1880
Joined: January 4th, 2010, 1:53 pm


Return to Multiplayer



cron