The correctness of this algorithm is intuitively clear.
这种算法的正确性是很显然的。
Once you have that version working, try to come up with improvements to your algorithm that increase its efficiency without sacrificing its correctness.
一旦你的这个版本正确工作了以后,试着改进你的算法在保持正确的前提下提高效率。
As a default, you should set fair to false unless it is critical to the correctness of your algorithm that threads be serviced in exactly the order they queued up.
作为默认设置,应当把公平设置为false,除非公平对您的算法至关重要,需要严格按照线程排队的顺序对其进行服务。
应用推荐