Skip to content
This repository has been archived by the owner on Jan 5, 2023. It is now read-only.

Commit

Permalink
making pool to initialize lazy (to allow updates)
Browse files Browse the repository at this point in the history
  • Loading branch information
estebanlm committed Nov 6, 2019
1 parent 745caff commit 4274024
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/ThreadedFFI/TFRunner.class.st
Expand Up @@ -33,9 +33,7 @@ TFRunner >> doInitialize [

callbackInvocationStack := Stack new.
stackProtect := Semaphore forMutualExclusion.
semaphorePool := TFPool
newProvider: [ TFExternalSemaphore new ]
size: self semaphorePoolSize
semaphorePool := nil
]

{ #category : #executing }
Expand Down Expand Up @@ -172,7 +170,10 @@ TFRunner >> returnCallback: aCallbackInvocation [
{ #category : #private }
TFRunner >> semaphorePool [

^ semaphorePool
^ semaphorePool ifNil: [
semaphorePool := TFPool
newProvider: [ TFExternalSemaphore new ]
size: self semaphorePoolSize ]
]

{ #category : #private }
Expand Down

0 comments on commit 4274024

Please sign in to comment.