<br><br><div class="gmail_quote">On Feb 12, 2008 11:01 PM, Igor Stasenko <<a href="mailto:siguctua@gmail.com">siguctua@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d"><br>> Anyway, I understand what you mean now. This looks like an implementation<br>> issue of your canvas, so the thread protection should be encapsulated inside<br>> it.<br>><br>> I.e.<br>
><br>> myMutex critical: [<br>> gl changeSomeState.<br>> ..some code..<br>> gl revertToPreviousState.<br>> ].<br>><br><br></div>It's still unsafe. Tell you why:<br><br>myMutex critical: [<br>
gl changeSomeState.<br> aBlock value.<br> gl revertToPreviousState.<br> ].<br><br>while block still can contain evil forks...<br><div><div class="Wj3C7c"><br></div></div></blockquote></div><br><br>Yea, well, don't evaluate untrusted blocks in critical regions :-).<br>
<br>And forks aren't evil. They're quite nice, really; try doing the same in Java or C!<br><br>Gulik.<br clear="all"><br>-- <br><a href="http://people.squeakfoundation.org/person/mikevdg">http://people.squeakfoundation.org/person/mikevdg</a><br>
<a href="http://gulik.pbwiki.com/">http://gulik.pbwiki.com/</a>