An Executor which executes tasks on the caller thread.
The tasks will be executed synchronously on a
per-key basis.
By saying
per-key, we mean that thread safety is guaranteed for threads calling it with
equals keys.
When two threads calling the executor with equals keys, the executions will never overlap each
other.
On the other hand, the executor is implemented so calls from different threads, with keys that are
not equals, will be executed concurrently with minimal contention between the calls.
Calling threads might be suspended.
Calling execute from different thread with equals keys has the same memory semantics as locking and
releasing a java.util.concurrent.locks.
Lock
.