Instead of creating a new main context to be used in the thread, we were using the global context. So, fix that, and create a totally new pair of main context and main loop to be used within the thread.
Instead of creating a new main context to be used in the thread, we were using the global context. So, fix that, and create a totally new pair of main context and main loop to be used within the thread.