lispgames / cl-sdl2

Common Lisp bindings for SDL2 using C2FFI.
MIT License
304 stars 82 forks source link

reset the main thread channel on error while joining the main thread #135

Closed death closed 3 years ago

death commented 3 years ago

When quitting, it is possible for *the-main-thread* to be a stale thread object and as a consequence for join-thread to signal an error. This patch makes sure to catch it and reset the *main-thread-channel*, which is also stale, to nil so that it can be re-created when needed.