|
|
6.127 SharedQueue
- Defined in namespace Smalltalk
- Category: Language-Processes
- My instances provide a guaranteed safe mechanism to allow for communication
between processes. All access to the underlying data structures is
controlled with critical sections so that things proceed smoothly.
6.127.1 SharedQueue class: instance creation
- new
- Create a new instance of the receiver
- sortBlock: sortBlock
- Create a new instance of the receiver which implements a priority queue with the given sort block
6.127.2 SharedQueue: accessing
- next
- Wait for an object to be on the queue, then remove it and answer it
- nextPut: value
- Put value on the queue and answer it
- peek
- Wait for an object to be on the queue if necessary, then answer the same object that #next would answer without removing it.
|