Braindump of requirements related to concurrency and synchronization
-
Monitors
- Monitor Enter
- Monitor Exit
- Object methods
- Synchronized Methods
-
Threads
global set of Monitor objects (maybe handled by the heap?)
current thread has a collection of MutexGuards it holds
monitorenter -> check if the current thread has a mutex guard on the monitor. Else block on lock.
monitorexit -> remove and drop the lock from the Thread's collection
remember to include this in synchronized method invocation and return as well as exception propagation
what is going on with wait/notify?? AAAA