702 ! |
702 ! |
703 |
703 |
704 waitUntilSuspended |
704 waitUntilSuspended |
705 "wait until the receiver is suspended." |
705 "wait until the receiver is suspended." |
706 |
706 |
707 |wasBlocked| |
707 [ |
708 |
708 suspendSemaphore isNil ifTrue:[suspendSemaphore := Semaphore new]. |
709 wasBlocked := OperatingSystem blockInterrupts. |
709 suspendSemaphore wait |
710 suspendSemaphore isNil ifTrue:[suspendSemaphore := Semaphore new]. |
710 ] valueUninterruptably |
711 suspendSemaphore wait |
711 |
712 wasBlocked ifFalse:[OperatingSystem unblockInterrupts]. |
712 "Modified: 28.2.1996 / 21:38:00 / cg" |
713 ! |
713 ! |
714 |
714 |
715 waitUntilTerminated |
715 waitUntilTerminated |
716 "wait until the receiver is terminated. |
716 "wait until the receiver is terminated. |
717 This method allows another process to wait till the receiver finishes." |
717 This method allows another process to wait till the receiver finishes." |
718 |
718 |
719 |wasBlocked sema| |
719 |sema| |
720 |
720 |
721 wasBlocked := OperatingSystem blockInterrupts. |
721 [ |
722 sema := Semaphore new. |
722 sema := Semaphore new. |
723 self exitAction:[sema signal]. |
723 self exitAction:[sema signal]. |
724 sema wait. |
724 sema wait. |
725 wasBlocked ifFalse:[OperatingSystem unblockInterrupts]. |
725 ] valueUninterruptably |
|
726 |
|
727 "Modified: 28.2.1996 / 21:38:21 / cg" |
726 ! |
728 ! |
727 |
729 |
728 withLowerPriorityDo:aBlock |
730 withLowerPriorityDo:aBlock |
729 "execute aBlock at a lower priority. This can be used to perform |
731 "execute aBlock at a lower priority. This can be used to perform |
730 time-consuming operations at a more user-friendly priority." |
732 time-consuming operations at a more user-friendly priority." |