protected class SCOPE.QueueThread
extends java.lang.Object
implements java.lang.Runnable
Modifier and Type | Field and Description |
---|---|
protected boolean |
first |
protected SCOPE.MessageQueue |
queue |
Constructor and Description |
---|
QueueThread(SCOPE.MessageQueue queue) |
Modifier and Type | Method and Description |
---|---|
void |
run()
Try to remove as many messages as possible from the queue and pass them up.
|
protected final SCOPE.MessageQueue queue
protected boolean first
public QueueThread(SCOPE.MessageQueue queue)
public void run()
- Threads T1 and T2 - T1 has the CAS - T1: remove() == null - T2: add() - T2: attempt to set the CAS: false, return - T1: set the CAS to false, return ==> Result: we have a message in the queue that nobody takes care of !
run
in interface java.lang.Runnable
Copyright © 1998-2020 Red Hat. All Rights Reserved.