Skip to content

Commit

Permalink
remove BlUseAsyncFeatures usage, register promise to a space
Browse files Browse the repository at this point in the history
  • Loading branch information
JurajKubelka committed Nov 6, 2024
1 parent 78e155e commit c65a3ec
Showing 1 changed file with 9 additions and 15 deletions.
24 changes: 9 additions & 15 deletions src/GToolkit-Presenter/GtLiveSlide.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -255,28 +255,22 @@ GtLiveSlide >> previousStepWith: aSlider [

{ #category : #accessing }
GtLiveSlide >> queueAsyncUpdate: aSpace [

"Submit a task to cache the receiver's elements"

| aSliceCommand |
cachedElement needsUpdate ifFalse: [ ^ self ].

aSliceCommand := GtSlideCommand new slide: self.

BlUseAsyncFeatures
ifEnabledDo: [
BlFrameTelemetry
time: [
'Schedule slide {1} update command in UI pool' format:
{ self class name } ]
during: [ [ aSliceCommand execute ] asAsyncFuture
await: self futureConfiguration ] ]
otherwise: [
BlFrameTelemetry
time: [
'Execute slide {1} update command directly' format:
{ self class name } ]
during: [ aSliceCommand execute ] ]
BlFrameTelemetry
time: [
'Schedule slide {1} update command in UI pool' format:
{ self class name } ]
during: [
| aPromise |
aPromise := [ aSliceCommand execute ] asAsyncFuture
await: self futureConfiguration.
aSpace enqueueTask: (BlPromiseTask new promise: aPromise) ]
]

{ #category : #accessing }
Expand Down

0 comments on commit c65a3ec

Please sign in to comment.