fix race condition in executor.postEvent on shutdown