Ensuring canvas safety (using canvas by multiple processes)

Michael van der Gulik mikevdg at gmail.com
Tue Feb 12 10:07:35 UTC 2008


On Feb 12, 2008 11:01 PM, Igor Stasenko <siguctua at gmail.com> wrote:

>
> > Anyway, I understand what you mean now. This looks like an
> implementation
> > issue of your canvas, so the thread protection should be encapsulated
> inside
> > it.
> >
> > I.e.
> >
> > myMutex critical: [
> >     gl changeSomeState.
> >     ..some code..
> >     gl revertToPreviousState.
> > ].
> >
>
> It's still unsafe. Tell you why:
>
> myMutex critical: [
>     gl changeSomeState.
>     aBlock value.
>     gl revertToPreviousState.
>  ].
>
> while block still can contain evil forks...
>
>

Yea, well, don't evaluate untrusted blocks in critical regions :-).

And forks aren't evil. They're quite nice, really; try doing the same in
Java or C!

Gulik.

-- 
http://people.squeakfoundation.org/person/mikevdg
http://gulik.pbwiki.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20080212/05d5b2f3/attachment.htm


More information about the Squeak-dev mailing list