CSharpRedotTools / Multiplayer-2023-Old

Client + server template
MIT License
8 stars 2 forks source link

11 clients join instantly then following clients take 1 second in between each other to join #24

Closed valkyrienyanko closed 1 year ago

valkyrienyanko commented 1 year ago

The solution to this was setting ThreadPool.SetMinThreads(100, 100);

Problem is caused by the min threads being set to 11 by default.

Tasks are enqueued to a pool. And then they wait their turn to get executed. So only min threads are executed asynchronously.