Skip to content

Commit

Permalink
[feenkcom/gtoolkit#3771]WeakArray class>>stopFinalizationProcess.
Browse files Browse the repository at this point in the history
  • Loading branch information
akgrant43 committed May 15, 2024
1 parent 881d110 commit 1df5fe2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/GToolkit-Utility-System/WeakArray.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ WeakArray class >> gtSummaryFor: aView [
items: [ {
'FinalizationProcess' -> (FinalizationProcess isNotNil and: [ FinalizationProcess isTerminated not ]).
'FinalizationSemaphore' -> FinalizationSemaphore size.
'MournLoopProcess' -> (MournLoopProcess isNotNil and: [ MournLoopProcess isTerminated not ]).
'MournLoopProcess' -> MournLoopProcess.
'StopRequested' -> StopRequested.
'StoppedSemaphore' -> StoppedSemaphore size. } ];
column: 'Item' text: #key;
Expand Down Expand Up @@ -115,8 +115,10 @@ WeakArray class >> stopFinalizationProcess [
[FinalizationProcess terminate.
FinalizationProcess := nil].

MournLoopProcess ifNil: [ ^ self ].
(MournLoopProcess isNil or: [ MournLoopProcess isTerminated ])
ifTrue: [ ^ self ].
self assert: StoppedSemaphore isSignaled not.
StopRequested := true.
StoppedSemaphore wait.

]

0 comments on commit 1df5fe2

Please sign in to comment.