It seems that on linux, being on the main thread is mandatory to avoid crashes