OperationQueue.st
changeset 4368 6596738636b2
parent 2994 81c2f934a7cd
child 4943 e8327124ac63
equal deleted inserted replaced
4367:4f19e2223fb4 4368:6596738636b2
     8  be provided or otherwise made available to, or used by, any
     8  be provided or otherwise made available to, or used by, any
     9  other person.  No title to or ownership of the software is
     9  other person.  No title to or ownership of the software is
    10  hereby transferred.
    10  hereby transferred.
    11 "
    11 "
    12 "{ Package: 'stx:libbasic2' }"
    12 "{ Package: 'stx:libbasic2' }"
       
    13 
       
    14 "{ NameSpace: Smalltalk }"
    13 
    15 
    14 Object subclass:#OperationQueue
    16 Object subclass:#OperationQueue
    15 	instanceVariableNames:'queue queueLock consumerProcess consumerProcessPriority'
    17 	instanceVariableNames:'queue queueLock consumerProcess consumerProcessPriority'
    16 	classVariableNames:''
    18 	classVariableNames:''
    17 	poolDictionaries:''
    19 	poolDictionaries:''
   267                         self startConsumerProcess
   269                         self startConsumerProcess
   268                     ].
   270                     ].
   269                 ] valueUninterruptably.
   271                 ] valueUninterruptably.
   270             ].
   272             ].
   271         ].
   273         ].
   272     ]. 
   274     ].
   273 
   275 
   274     asynchronous ifTrue:[
   276     asynchronous ifTrue:[
   275         ^ nil
   277         ^ nil
   276     ].
   278     ].
   277 
   279 
   280     (ex := myOpInQ exception) notNil ifTrue:[
   282     (ex := myOpInQ exception) notNil ifTrue:[
   281         "/ trick: makes calling chain look as if the error happended here
   283         "/ trick: makes calling chain look as if the error happended here
   282         "/ (in reality, it happended in the consumer-process).
   284         "/ (in reality, it happended in the consumer-process).
   283         self linkContextChain:ex suspendedContext.
   285         self linkContextChain:ex suspendedContext.
   284 
   286 
   285         ^ ex creator raiseErrorString:('asyncronous operation error:' , ex errorString) in:ex suspendedContext
   287         ^ ex creator raiseErrorString:('asynchronous operation error:' , ex errorString) in:ex suspendedContext
   286     ].
   288     ].
   287     "/ now, the operation has been performed - return its result
   289     "/ now, the operation has been performed - return its result
   288     ^ myOpInQ operationResult
   290     ^ myOpInQ operationResult
       
   291 
       
   292     "Modified (format): / 22-05-2017 / 12:08:05 / mawalch"
   289 ! !
   293 ! !
   290 
   294 
   291 !OperationQueue methodsFor:'queries'!
   295 !OperationQueue methodsFor:'queries'!
   292 
   296 
   293 size
   297 size
   347 ! !
   351 ! !
   348 
   352 
   349 !OperationQueue class methodsFor:'documentation'!
   353 !OperationQueue class methodsFor:'documentation'!
   350 
   354 
   351 version
   355 version
   352     ^ '$Header: /cvs/stx/stx/libbasic2/OperationQueue.st,v 1.9 2013-04-27 12:45:52 cg Exp $'
   356     ^ '$Header$'
   353 ! !
   357 ! !
   354 
   358