Le 13/05/2015 16:06, Ben Coman a écrit :
The problem with this is that non-UI threads call #endEntry: which bypasses
the intent of #stepGlobal only being called from the UI thread.   (btw I
should update its comment to reflect this.)   So the minimal effective
change would be...

     ThreadSafeTranscript>>endEntry:
         accessSemaphore critical: [ deferredEndEntry := true ].
         (UIManager default uiProcess = Processor activeProcess) ifTrue: [
             self stepGlobal.
             World displayWorldSafely.
             ].

Ah yes, you are perfectly right, I missed those points

However this would need to massaged to remove the referenced global classes
(UIManager and World) to avoid introducing dependencies breaking the Image
shrink work.  Maybe these can be passed into the Transcript object where
#stepGlobal is currently called from.

Yes, may be one day the UI (doOnecycle, runStepxxx with World etc) will be refactored too, however, today this is just a hack. Elliot's expression "the tail wagging the dog" perfectly applies here: the morph wagging the world

:)



--
Regards,

Alain


Reply via email to