equal
deleted
inserted
replaced
196 !BackgroundQueueProcessingJob methodsFor:'utilities'! |
196 !BackgroundQueueProcessingJob methodsFor:'utilities'! |
197 |
197 |
198 waitUntilProcessed |
198 waitUntilProcessed |
199 "Blocks the receiver until all items from the queue are processed. |
199 "Blocks the receiver until all items from the queue are processed. |
200 NOTE, that it may block forever if another thread is filling queue |
200 NOTE, that it may block forever if another thread is filling queue |
201 fadt enough." |
201 fast enough." |
202 |
202 |
203 self scheduled ifFalse:[ ^ self ]. |
203 | shouldWait | |
204 queueProcessedSema wait. |
204 queueAccessLock critical:[ |
|
205 shouldWait := queue isEmpty. |
|
206 ]. |
|
207 shouldWait ifTrue:[ |
|
208 self start. |
|
209 queueProcessedSema wait. |
|
210 ] |
205 |
211 |
206 " |
212 " |
207 queueProcessedSema signalForAll |
213 queueProcessedSema signalForAll |
208 " |
214 " |
209 |
215 |
211 ! ! |
217 ! ! |
212 |
218 |
213 !BackgroundQueueProcessingJob class methodsFor:'documentation'! |
219 !BackgroundQueueProcessingJob class methodsFor:'documentation'! |
214 |
220 |
215 version |
221 version |
216 ^ '$Header: /cvs/stx/stx/libbasic2/BackgroundQueueProcessingJob.st,v 1.10 2011-12-06 18:03:05 vrany Exp $' |
222 ^ '$Header: /cvs/stx/stx/libbasic2/BackgroundQueueProcessingJob.st,v 1.11 2011-12-13 14:16:02 vrany Exp $' |
217 ! |
223 ! |
218 |
224 |
219 version_CVS |
225 version_CVS |
220 ^ '$Header: /cvs/stx/stx/libbasic2/BackgroundQueueProcessingJob.st,v 1.10 2011-12-06 18:03:05 vrany Exp $' |
226 ^ '$Header: /cvs/stx/stx/libbasic2/BackgroundQueueProcessingJob.st,v 1.11 2011-12-13 14:16:02 vrany Exp $' |
221 ! |
227 ! |
222 |
228 |
223 version_SVN |
229 version_SVN |
224 ^ '§Id§' |
230 ^ '§Id§' |
225 ! ! |
231 ! ! |