Asynchronous Transfer of Control
From Suhrid.net Wiki
Intro
- An ATC is where the point of execution of one SO is changed by the action of another SO.
- Therefore an SO may be executing on 1 method and through no action of its own, find itself executing in another method.
- Controversial:
- Complicates language semantics.
- Makes it difficult to write correct code as it may be interfered with.
- Increases complexity of the RTJVM.
- Slow down code which does not use the feature.
Requirements for ATC
- Fundamental requirement is for a thread to respond quickly to a condition detected by another thread.
- Error recovery: To support coordinated error recovery between real-time threads.
- Where several threads are performing a computation, an error detected by one thread needs to be quickly and safely communicated to other threads.