How to detect if executing on main thread vs worker - Deno