Пересмотр асинхронностей
This commit is contained in:
@@ -20,8 +20,10 @@ namespace LV::Server {
|
||||
|
||||
GameServer::~GameServer() {
|
||||
shutdown("on ~GameServer");
|
||||
|
||||
|
||||
|
||||
RunThread.join();
|
||||
WorkDeadline.cancel();
|
||||
UseLock.wait_no_use();
|
||||
LOG.info() << "Сервер уничтожен";
|
||||
}
|
||||
@@ -448,7 +450,7 @@ void GameServer::stepPlayers() {
|
||||
auto lock = External.NewConnectedPlayers.lock_write();
|
||||
|
||||
for(std::unique_ptr<RemoteClient> &client : *lock) {
|
||||
co_spawn(client->run());
|
||||
asio::co_spawn(IOC, client->run(), asio::detached);
|
||||
Game.CECs.push_back(std::make_unique<ContentEventController>(std::move(client)));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user