Schedules action to be executed by the simulation thread, useful for synchronization purposes (e.g., make sure that the environment is not being changed while the requested operation is being executed). An exception thrown by action makes the simulation terminate.