Gate(alwaysQueue: Boolean = false)
An executor useful for unit tests: allows the current thread to block until a command arrives from another thread, which is then executed. Inbound closures/commands stack up until they are cleared by looping.
alwaysQueue
- If true, executeASAP will never short-circuit and will always queue up.