| Package | Description |
|---|---|
| net.lecousin.framework.concurrent.async |
Classes implementing synchronization points such as asynchronous result, join point...
|
| Modifier and Type | Class and Description |
|---|---|
class |
LockPoint<TError extends Exception>
A LockPoint is similar to a mutual exclusion, but can be locked and unlocked by any thread.
For example, a first thread can lock it, and a second thread (after some processing is done) can unlock it. A LockPoint can also be seen as a SynchronizationPoint but reusable. When a thread calls the lock method: if the lock point is not yet locked it becomes locked and the calling thread can continue working, and must call the method unlock once done. if the lock point is already locked, the calling thread is paused, waiting for the lock point to be unlocked. If several threads are waiting for the lock point to be unlocked: Only one is resume and obtain the lock, the others are still paused The order the threads are resumed is undetermined, meaning it is not necessarily in the order they called the lock method |
class |
MutualExclusion<TError extends Exception>
A MutualExclusion must be unlocked by the same thread that locked it.
|
class |
WaitingDataQueueSynchronizationPoint<DataType,TError extends Exception>
Like a SynchronizationPoint, but with a queue of waiting data.
|
Copyright © 2019. All rights reserved.