Check if game thread is alive before joining.

TODO: Improve game loop.