In Java, How to make application thread-safe ?

You should use the word synchronized to mark the critical section of code. You may also use other methods of thread synchronization (see wait(), notify(), notifyAll() etc.

No comments:

Post a Comment