mas-bandwidth/yojimbo

BaseServer.AdvanceTime blocking main thread

Closed this issue · 1 comments

Gulum commented

Issue description

OS: Windows 64bit

When I select random things in the command line window, the main thread gets blocked by Yojimbo. It continues when I press enter on the keyboard.
I don't know if its expected behavior, related to windows or specific to my setup.

Steps to reproduce the issue

Start an example server with the following loop logic:

    // stop if server is not running
    if (!m_server.IsRunning())
    {
        m_running = false;
        return;
    }

    // update server and process messages
    m_server.AdvanceTime(m_time);
    m_server.ReceivePackets();
    ProcessMessages();

    // ... process client inputs ...
    // ... update game ...
    // ... send game state to clients ...

    m_server.SendPackets();

Selecting random stuff in the command line window cause m_server.AdvanceTime(m_time) to block the thread.

What's the expected result?

The program shouldn't block.

What's the actual result?

BaseServer::AdvanceTime(m_time);

blocks the Thread.

Additional details / screenshot

If anything is needed just let me know.

Any help is appreciated!

Gulum commented

Was related to windows. Disabling QuickEditMode in CMD properties stops this behavior.