mining on main thread