If libuv is loaded as a DLL and is later unloaded deadlocks can happen when running atexit handlers, so we can't use synchronization priomitives or join threads there. For reference see https://github.com/saghul/pyuv/issues/171
heap_remove()