单项选择题
在ReentrantLock 中,如何通过构造方法创建一个公平锁?()
A.new ReentrantLock()B.new ReentrantLock(true)C.new ReentrantLock(false)D.new ReentrantLock(ReentrantLock.FAIR)
单项选择题 AbstractQueuedSynchronizer 中的tryAcquireShared 方法和tryReleaseShared 方法是哪种同步模式下使用的?()
单项选择题 AbstractQueuedSynchronizer 使用了()的等待队列机制来实现线程在同步状态上的等待和唤醒操作。
单项选择题 在Java多线程中,一般推荐使用()替换Random来生成随机数。