[Pharo-dev] SHTextStyler>>#styleInBackgroundProcess:

phil at highoctane.be phil at highoctane.be
Tue Nov 19 13:50:25 EST 2013


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 at 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 at 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
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20131119/3b15b568/attachment-0002.html>


More information about the Pharo-dev mailing list