Câu hỏi của albert

Synchronized methods example, main and background thread

Hello Guys, This is an example from Effective Java 2nd Ed, Joshua Bloch. Properly synchronized cooperative thread termination. I found this program really strange concerning program flow. I put printlns into the author’s example as a help. The main thread is going to terminate the ...

albert viết 09:26 ngày 01/10/2018 chỉnh sửa

HashSet, Testing Concurrency using multiple threads

Hello Guys, A number of threads will access a serial number generator (class SerialNumberGenerator). The threads will generate and store the numbers in a HashSet. The purpose of the HashSet is to verify that the numbers are unique. According to Java documentation on HashSets these ...

albert viết 09:26 ngày 01/10/2018 chỉnh sửa
1