Process.st
changeset 2262 4c4d810f006f
parent 2197 bb9bc22f794b
child 2268 e7e1f98c3bce
equal deleted inserted replaced
2261:61096f935f76 2262:4c4d810f006f
   991 waitUntilSuspended
   991 waitUntilSuspended
   992     "wait until the receiver is suspended."
   992     "wait until the receiver is suspended."
   993 
   993 
   994     [
   994     [
   995         self isDead ifTrue:[^ self].
   995         self isDead ifTrue:[^ self].
   996         suspendSemaphore isNil ifTrue:[suspendSemaphore := Semaphore new].
   996         suspendSemaphore isNil ifTrue:[
       
   997 	    suspendSemaphore := Semaphore new name:'process suspend'
       
   998 	].
   997         suspendSemaphore wait
   999         suspendSemaphore wait
   998     ] valueUninterruptably
  1000     ] valueUninterruptably
   999 
  1001 
  1000     "Modified: 8.11.1996 / 23:05:24 / cg"
  1002     "Modified: 8.11.1996 / 23:05:24 / cg"
  1001 !
  1003 !
  1007     |sema|
  1009     |sema|
  1008 
  1010 
  1009     [
  1011     [
  1010         self isDead ifTrue:[^ self].
  1012         self isDead ifTrue:[^ self].
  1011 
  1013 
  1012         sema := Semaphore new.
  1014         sema := Semaphore new name:'process termination'.
  1013         self addExitAction:[sema signal].
  1015         self addExitAction:[sema signal].
  1014         sema wait.
  1016         sema wait.
  1015 
  1017 
  1016     ] valueUninterruptably
  1018     ] valueUninterruptably
  1017 
  1019 
  1309 ! !
  1311 ! !
  1310 
  1312 
  1311 !Process class methodsFor:'documentation'!
  1313 !Process class methodsFor:'documentation'!
  1312 
  1314 
  1313 version
  1315 version
  1314     ^ '$Header: /cvs/stx/stx/libbasic/Process.st,v 1.72 1997-01-17 20:57:55 cg Exp $'
  1316     ^ '$Header: /cvs/stx/stx/libbasic/Process.st,v 1.73 1997-01-24 22:10:56 cg Exp $'
  1315 ! !
  1317 ! !
  1316 Process initialize!
  1318 Process initialize!