Only that I do face the same thing :-)



---
Philippe Back
Dramatic Performance Improvements
Mob: +32(0) 478 650 140 | Fax: +32 (0) 70 408 027
Mail:phil@highoctane.be | Web: http://philippeback.eu
Blog: http://philippeback.be | Twitter: @philippeback
Youtube: http://www.youtube.com/user/philippeback/videos

High Octane SPRL
rue cour Boisacq 101 | 1301 Bierges | Belgium

Pharo Consortium Member -�http://consortium.pharo.org/
Featured on the Software Process and Measurement Cast -�http://spamcast.libsyn.com
Sparx Systems Enterprise Architect and Ability Engineering EADocX Value Added Reseller



On Tue, Nov 19, 2013 at 5:26 PM, Sven Van Caekenberghe <sven@stfx.eu> wrote:
In many images that I do real development in (code writing, debugging, ..) I always get a number of processes stuck while waiting for a semaphore in SHTextStyler>>#styleInBackgroundProcess:

I am in no way an expert in these areas, but today I tried the following change (waiting on the semaphore with a timeout):

SHTextStyler>>#styleInBackgroundProcess: aText
� self terminateBackgroundStylingProcess.
� stylingEnabled ifTrue: [
� � text := aText copy.
� � self monitor critical: [
� � � sem := Semaphore new.
� � � [
� � � � sem ifNotNil: [
� � � � � ((sem waitTimeoutMSecs: 250) not and: [ view notNil ])
� � � � � � ifTrue: [ view stylerStyledInBackground: text ] ] ] forkAt: Processor activePriority.
� � � backgroundProcess := [
� � � � self privateStyle: text.
� � � � sem signal ] forkAt: Processor userBackgroundPriority ] ]

Comments ?

Sven