fixed a problem in breaking out of an initial context

This commit is contained in:
hyunghwan.chung
2016-05-15 15:51:41 +00:00
parent 801b6d92d4
commit 19735bac69
7 changed files with 63 additions and 38 deletions

View File

@ -439,8 +439,9 @@ PROCESS TESTING
'====================' dump.
([ :a :b | "a := 20." b := [ a + 20 ]. b value.] value: 99 value: 100) dump.
'====================' dump.
[ :a :b | a dump. b dump. a := 20. b := [ a + 20 ]. b value.] value dump. ## not sufficient arguments. it must fail
[ :a :b | a dump. b dump. a := 20. b := [ a + 20 ]. b value.] value dump. ## not sufficient arguments. it must fail
"[ :a :b | a dump. b dump. a := 20. b := [ a + 20 ]. b value.] on: Exception do: [:ex | 'Exception' dump]."
"
FFI isNil dump.

View File

@ -59,7 +59,10 @@
10 timesRepeat: ['BLOCK #1' dump. Processor activeProcess sleep: 1.].
s1 signal
] newProcess.
t2 := [ 5 timesRepeat: ['BLOCK #2' dump]. s2 signal. ] newProcess.
t2 := [
5 timesRepeat: ['BLOCK #2' dump. "Processor activeProcess sleep: 1." ].
'SIGNALLING S2...' dump. s2 signal.
] newProcess.
t1 resume.
t2 resume.
@ -67,15 +70,18 @@
Processor signal: s3 after: 10.
'STARTED t1 and t2' dump.
s1 wait.
s2 wait.
s2 wait.
's2 WAITED....' dump.
s1 wait.
's1 WAITED....' dump.
'WAITING ON S3...' dump.
##Processor unsignal: s3.
s3 wait.
10 timesRepeat: ['WAITED t1 and t2' dump].
'END OF MAIN' dump.
}