Platform/IPC

동기화 - 자바

jjryu 2016. 7. 24. 16:57

java.util.Queue<>

.offer()

.remove()


java.util.concurrent.BlockingQueue<> -> extends Queue<>

synchronized queue


.put()

.take()


java.util.concurrent.LinkedBlockingQueue<> implements BlockingQueue<> // Unlimited size


java.util.concurrent.ArrayBlockingQueue<> implements BlockingQueue<> // Fixed size


java.util.concurrent.SynchronousQueue<> implements BlockingQueue<> // Size of 1