Add option to disable main thread freeze while disabling server.