最近、私はこの問題を最初のリーダライタの問題とよく似ています。 Implementing an N process barrier using semaphores 私はそれを再利用し、正常に動作することができることを確認しましたし、それを修正しようとしています。 n = the number of threads
count = 0
mutex = Semaphore(1)
barrier
public class semaphoreTest {
static LinkedList<Integer> integerLinkedList = new LinkedList<>();
static Semaphore semaphore = new Semaphore(1);
static Object lock = new Object();
public static vo