Skip to content

Commit 7ea5d16

Browse files
committed
Adds the concurrency features to suspend all example processes when an error is encountered and store the erroring process.
1 parent 49582a9 commit 7ea5d16

37 files changed

+141
-74
lines changed
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
tracing
22
resumeTracing
3-
(self tracingProcess notNil and: [self traceInformation isProcessSuspended])
4-
ifTrue: [self tracingProcess resume]
3+
^ self traceInformation resumeProcess
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
tracing
22
suspendTracingProcess
33

4-
self tracingProcess ifNotNil: [self tracingProcess suspend]
4+
^ self traceInformation suspendProcess
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
tracing
22
tracingIsStillRunning
33

4-
^ self tracingProcess notNil and: [self tracingProcess isTerminated not]
4+
^ self traceInformation tracingIsStillRunning

packages/Babylonian-Core.package/BPAbstractExample.class/instance/tracingProcess.st

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
tracing
22
tracingProcessIsSuspended
33

4-
^ self tracingProcess notNil and: [self traceInformation isProcessSuspended]
4+
^ self traceInformation isProcessSuspended

packages/Babylonian-Core.package/BPAbstractExample.class/methodProperties.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"printOn:" : "jb 12/7/2020 18:10",
3434
"probes" : "lu 12/1/2021 07:36",
3535
"removeTrace" : "pre 1/11/2023 10:43",
36-
"resumeTracing" : "pre 1/11/2023 10:43",
36+
"resumeTracing" : "pre 1/12/2023 09:39",
3737
"runOn:" : "pre 1/11/2023 10:47",
3838
"runSetUp" : "pre 7/22/2022 21:17",
3939
"runSetUpWith:" : "pre 7/22/2022 21:17",
@@ -44,7 +44,7 @@
4444
"setUpScript" : "pre 1/11/2023 10:47",
4545
"setUpScript:" : "pre 1/11/2023 10:48",
4646
"startWatchdog:" : "pre 11/2/2022 11:40",
47-
"suspendTracingProcess" : "joabe 9/30/2022 01:28",
47+
"suspendTracingProcess" : "pre 1/12/2023 09:39",
4848
"tearDownScript" : "pre 1/11/2023 10:48",
4949
"tearDownScript:" : "pre 1/11/2023 10:48",
5050
"timeout" : "pre 1/11/2023 10:46",
@@ -57,8 +57,7 @@
5757
"traceToHaltAt:onCount:" : "lu 11/27/2021 14:03",
5858
"traceValues" : "lu 12/6/2021 14:49",
5959
"traceValuesMorphs" : "jb 5/20/2021 01:03",
60-
"tracingIsStillRunning" : "joabe 9/28/2022 23:20",
61-
"tracingProcess" : "pre 1/11/2023 10:46",
62-
"tracingProcessIsSuspended" : "pre 1/11/2023 10:47",
60+
"tracingIsStillRunning" : "pre 1/12/2023 09:40",
61+
"tracingProcessIsSuspended" : "pre 1/12/2023 09:38",
6362
"uniqueIdentifier" : "pre 1/21/2021 19:55",
6463
"update:with:" : "pre 9/1/2022 21:54" } }
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
accessing
1+
process control
22
isProcessSuspended
33

4-
^ self tracingProcess isSuspended
4+
^ self tracingProcess notNil and: [self tracingProcess isSuspended]
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
process control
2+
resumeProcess
3+
4+
self tracingProcessAndDescendants do: [:p |
5+
p isSuspended ifTrue: [p resume]]
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
process control
2+
suspendProcess
3+
4+
(self tracingProcessAndDescendants copyWithout: Processor activeProcess) do: [:p |
5+
(p isSuspended not and: [p isTerminated not]) ifTrue: [p suspend]]
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
process control
22
terminateTracingProcess
33

4-
self tracingProcess ifNotNil: [:aTracingProcess |
5-
{aTracingProcess} , (BPProcessGenealogy allDescendantsOf: aTracingProcess) do: [:p |
6-
p isTerminated ifFalse: [p terminate]]].
4+
self tracingProcessAndDescendants do: [:p |
5+
p isTerminated ifFalse: [p terminate]]

0 commit comments

Comments
 (0)