[Cuis-dev] #redrawNeeded from background processes
Juan Vuletich
juan at jvuletich.org
Mon Jun 3 07:08:12 PDT 2019
On 6/1/2019 8:05 AM, Phil B via Cuis-dev wrote:
> Every now and then when sending #redrawNeeded from a background
> process, you'll probably find you get an 'attempt to index
> non-existent element in an ordered collection' error in
> DamageRecorder. This is because DamageRecorder is not thread-safe
> (OK, process-safe) I've found this to be a miserable problem to deal
> with because even if you're trying to be good and only message morphs
> from the UI process, finding all the places/ways that #redrawNeeded
> can get called can be tricky if your Morph is updating based on events
> from background processes.
>
> The attached changeset fixes that... now you can send #redrawNeeded
> from wherever you want, whenever you want. (at least I haven't been
> able kill it yet) This doesn't appear to have any adverse drawing
> performance impact that I've been able to measure.
>
> Thanks,
> Phil
Oh! That was a nasty bug! Your fix is now @ GitHub (together with
updated images).
Thank you!
--
Juan Vuletich
www.cuis-smalltalk.org
https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev
https://github.com/jvuletich
https://www.linkedin.com/in/juan-vuletich-75611b3
@JuanVuletich
More information about the Cuis-dev
mailing list