Skip to content

Fix the VM not stopping fully when an error occurs #311

@MaartenS11

Description

@MaartenS11

When an error occurs with for example a primitive, the main interpreter stops but the communication thread will keep running forever, as such communication.join(); in main.cpp (emulator) will never finish causing the process to stay alive forever.

To fix this, we need some kind of way to notify this loop that the process has stopped, such as a simple boolea running flag. We then set this to false at the end so that the read thread which would use while (running) instead of while(true) gracefully comes to stop, and then the thread can be joined.

Fixing this issue also fixes #310.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions