Let web worker run code on main thread and vice versa