Skip to content

Commit 22b6ffe

Browse files
authored
Merge pull request #4 from seandenigris/enh_stop-on-shutdown
Stop PBApplication on shutdown
2 parents 158c224 + 487f3e4 commit 22b6ffe

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/PythonBridge/PBApplication.class.st

+10
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ PBApplication class >> do: aBlockClosure [
4444
^ retVal
4545
]
4646

47+
{ #category : #initialization }
48+
PBApplication class >> initialize [
49+
SessionManager default registerToolClassNamed: self name
50+
]
51+
4752
{ #category : #testing }
4853
PBApplication class >> isRunning [
4954
^ uniqueInstance notNil and: [ uniqueInstance isRunning ]
@@ -88,6 +93,11 @@ PBApplication class >> send: obj [
8893
^ self uniqueInstance send: obj
8994
]
9095

96+
{ #category : #accessing }
97+
PBApplication class >> shutdown: isImageQuitting [
98+
isImageQuitting ifTrue: [ self stop ]
99+
]
100+
91101
{ #category : #'start-stop' }
92102
PBApplication class >> start [
93103
self isRunning ifTrue: [ Error signal: 'Keras already running.' ].

0 commit comments

Comments
 (0)