Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Monitor (synchronization)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Implicit condition variable monitors=== [[File:Monitor (synchronization)-Java.png|thumb|200px|right|A Java style monitor]] In the [[Java (programming language)|Java]] language, each object may be used as a monitor. Methods requiring mutual exclusion must be explicitly marked with the '''[[Java keyword|synchronized]]''' keyword. Blocks of code may also be marked by '''[[Java keyword|synchronized]]'''.{{sfn|Bloch|2018|loc=§Item 11: Synchronize access to shared mutable data|p=311-316}} Rather than having explicit condition variables, each monitor (i.e., object) is equipped with a single wait queue in addition to its entrance queue. All waiting is done on this single wait queue and all '''notify''' and '''notifyAll''' operations apply to this queue.{{sfn|Bloch|2018|loc=§Chapter 11 Item 81: Prefer concurrency utilities to wait and notify|p=325-329}} This approach has been adopted in other languages, for example [[C Sharp (programming language)|C#]].
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)