run actions in another thread as the gui thread (JS Thread) to fix deadlocks