You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In board.py --> class Board --> __init__() (line 1329) a signal handler is added.
This overwrites previously defined signal handlers.
Additionally, because of this the init function may only be called in the main thread of the application.
solutions:
a)
Define a "stop()" method and do cleanup there. Best solution.
b)
When adding a signal handler with signal.signal() the old handler is returned.
Save it and call it later like this:
class Board:
def __init__(self):
self.prev_handler = signal.signal(signal.SIGINT, self._exit_handler)
def _exit_handler(self, signum, frame):
print("exit_handler")
# do cleanup
self.prev_handler(signum, frame)
Thank you and best regards
The text was updated successfully, but these errors were encountered:
Hi!
In
board.py --> class Board --> __init__() (line 1329)
a signal handler is added.This overwrites previously defined signal handlers.
Additionally, because of this the init function may only be called in the main thread of the application.
solutions:
a)
Define a "stop()" method and do cleanup there. Best solution.
b)
When adding a signal handler with signal.signal() the old handler is returned.
Save it and call it later like this:
Thank you and best regards
The text was updated successfully, but these errors were encountered: