Skip to content

Commit c1bbed2

Browse files
committed
Simplifies the background tracing logic considerably.
1 parent ab35ade commit c1bbed2

File tree

15 files changed

+34
-59
lines changed

15 files changed

+34
-59
lines changed

packages/Babylonian-Core.package/BPContinuousRunExample.class/instance/traceAsyncNotifying..st

Lines changed: 0 additions & 5 deletions
This file was deleted.

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,4 @@
99
"stopTracing" : "pre 9/6/2022 09:07",
1010
"toggleTracing" : "pre 9/6/2022 09:11",
1111
"trace" : "pre 9/5/2022 14:51",
12-
"traceAsyncNotifying:" : "pre 9/5/2022 14:51",
1312
"traceInBackground" : "pre 9/5/2022 14:52" } }

packages/Babylonian-Core.package/BPExample.class/instance/traceAsyncNotifying..st

Lines changed: 0 additions & 9 deletions
This file was deleted.

packages/Babylonian-Core.package/BPExample.class/instance/traceInBackground.st

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,10 @@ tracing
22
traceInBackground
33

44
<bpRelevantMethod>
5-
| exampleExecution promise |
5+
| traceAndProcess |
66
self ensureTerminatedProcess.
7-
promise := Promise new.
8-
promise whenResolved: [:trace |
9-
Project current addDeferredUIMessage: [traceInformation trace: trace]].
10-
exampleExecution := [[
11-
self traceAsyncNotifying: [:intermediateTrace |
12-
promise resolveWith: intermediateTrace]]
13-
on: BPExampleExecutionInterrupted
14-
do: [:e |
15-
"We need to remember this in order to terminate example processes
16-
whenever a trace leaves the registry."
17-
e trace exampleExecutionProcess: Processor activeProcess.
18-
promise resolveWith: e trace.]].
19-
traceInformation tracingProcess: (exampleExecution
20-
forkAt: Processor userSchedulingPriority
21-
named: 'Execution of example ' , self exampleName)
7+
8+
traceAndProcess := [self execute] bpTraceInBackgroundForExample: self.
9+
traceInformation
10+
trace: traceAndProcess first;
11+
tracingProcess: traceAndProcess second.

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@
5151
"timeout:" : "joabe 9/27/2022 20:26",
5252
"toggleIsActive" : "pre 10/23/2020 10:16",
5353
"trace" : "pre 5/6/2021 17:47",
54-
"traceAsyncNotifying:" : "pre 5/6/2021 17:48",
55-
"traceInBackground" : "pre 5/6/2021 17:47",
54+
"traceInBackground" : "pre 1/11/2023 10:14",
5655
"traceToHaltAt:" : "lu 11/27/2021 14:06",
5756
"traceToHaltAt:onCount:" : "lu 11/27/2021 14:03",
5857
"traceValues" : "lu 12/6/2021 14:49",
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
executing
22
prepareRunState
33

4-
"By default examples do not prepare any run state"
54
^ BPScriptExampleRunConfiguration new

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"asPragma" : "pre 5/3/2021 17:03",
66
"initializeFromPragma:" : "pre 7/22/2022 21:07",
77
"morphClass" : "pre 9/30/2020 10:41",
8-
"prepareRunState" : "pre 7/22/2022 21:19",
8+
"prepareRunState" : "pre 1/11/2023 09:48",
99
"runOn:" : "pre 7/22/2022 21:37",
1010
"script" : "pre 9/30/2020 11:00",
1111
"script:" : "jb 12/7/2020 18:13",

packages/Babylonian-Core.package/BPTraceValue.class/instance/ignoredMessagesInStack.st

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ignoredMessagesInStack
55
MethodReference class: BPExample selector: #traceInBackground.
66
MethodReference class: BlockClosure selector: #on:do:.
77
MethodReference class: BPExample selector: #traceAsyncNotifying:.
8-
MethodReference class: BlockClosure selector: #bpTraceAsyncForExample:notifying:.
8+
MethodReference class: BlockClosure selector: #bpTraceInBackgroundForExample:.
99
MethodReference class: BlockClosure selector: #bpTraceWith:.
1010
MethodReference class: Symbol selector: #withLayerDo:.
1111
MethodReference class: Array selector: #withLayersDo:.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"containedMethodReference" : "pre 11/16/2022 16:04",
1212
"filteredStack" : "pre 11/16/2022 15:57",
1313
"ignoredClassesInStack" : "pre 11/16/2022 15:56",
14-
"ignoredMessagesInStack" : "pre 11/16/2022 15:56",
14+
"ignoredMessagesInStack" : "pre 1/11/2023 10:15",
1515
"isStackFull" : "jb 6/30/2021 01:26",
1616
"printOn:" : "jb 5/19/2021 20:59",
1717
"shouldBeIgnored:" : "pre 11/16/2022 16:04",

packages/Babylonian-Core.package/BlockClosure.extension/instance/bpTraceAsyncForExample.notifying..st

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)