added a new reserved word - thisProcess

This commit is contained in:
hyunghwan.chung
2016-07-05 15:22:29 +00:00
parent a22f5ea0ab
commit 27f00148a1
6 changed files with 37 additions and 9 deletions

View File

@ -65,7 +65,7 @@
##
## 2) process terminated by itself
## p := [
## [ Processor activeProcess terminate. ] ensure: [System logNl: 'ensured....']
## [ thisProcess terminate. ] ensure: [System logNl: 'ensured....']
## ] newProcess.
## p resume.
## p terminate.
@ -74,7 +74,8 @@
## the process must not be scheduled.
## ----------------------------------------------------------------------------------------------------------
(Processor activeProcess ~~ self) ifTrue: [ self _suspend ].
##(Processor activeProcess ~~ self) ifTrue: [ self _suspend ].
(thisProcess ~~ self) ifTrue: [ self _suspend ].
self.current_context unwindTo: self.initial_context return: nil.
^self _terminate
}