Thread safety

synchronized is removed but synchronization still occurs at line 1034. this was the only way to make the callback not under the lock (in a case runOnContext is called with the same thread and not in a new task in the eventloop).