Synchronization in java ForkJoinPool compute() method
问题 in Java: The Complete Reference we read: In general, a ForkJoinTask should not use synchronized methods or synchronized blocks of code. Also, you will not normally want to have the compute( ) method use other types of synchronization, such as a semaphore Why should I avoid synchronizing in compute()? Is it still possible in some situation to use synchronization such as semaphore or synchronized? What other method should I use from java.util.concurrent to have scallable number of threads as in