Sponsored Link •
|
Advertisement
|
The Guidelines:
In understand the Java monitor, also state that: Don't depend upon prioritization or time slicing for program correctness. Mention that in a real time VM, you can depend on those things. Perhaps use IntBuffer here as an example, because it shows both synchronized keywords and wait and notify. That'll be enough for this guidelines book. In Object Design, can go into the nitty gritty details of wait and notify.
In appreciate the significance of thread safety, go through RGBColor examples and tables.
In consider thread-safety when designing any concrete class, talk about applying thread safety consciously, including the option of immutability and using thread-safe wrappers. Mention that in the semantic description, things should be assumed to be thread safe, unless explicitly says that it isn't thread safe.
In provide a friendly way for clients to ask a thread to stop, Talk about stop(), suspend(), and resume(), and finally clauses as the way to release resources. Describe how finally clauses are executed on the way up the call stack.
Sponsored Links
|