<div dir="ltr">Hi Levente,<br><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Dec 31, 2016 at 11:45 AM, Levente Uzonyi <span dir="ltr"><<a href="mailto:leves@caesar.elte.hu" target="_blank">leves@caesar.elte.hu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Hi Eliot,<br>
<br>
I'm no expert in C programming, but I suppose a global counter could be used to ensure that no other threads have modified the array before swapping the pointers.<br></blockquote><div><br></div><div>I think one uses exactly the strategy you used in the Smalltalk code, namely:</div><div>    if the structure needs growing, create a grown initialised copy, and then do a test-and-set to update the pointer.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Btw, I thought that object pinning would make it possible to get rid of the external semaphore table altogether. We need different plugin code for that, but I think it would be simpler and more efficient.<br></blockquote><div><br></div><div>Well, I think pinning should help with a number of things.  But I don't see how it suffices here.  Making signal thread-safe is probably quite difficult, so the indirect request signal/grant signal scheme that the external semaphore table provides is convenient.  What am I missing?</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Why is #at:put: not thread-safe? Isn't it a primitive, so that no suspension point occurs provided both arguments are valid?<br></blockquote><div><br></div><div>Ah, good point!  That's not obvious :-).  I'll change my comment :-)  Cool, man!</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Happy New Year!<span class="HOEnZb"><font color="#888888"><br>
<br>
Levente<br>
</font></span></blockquote></div><br>Have a great year!  And good wishes to everyone!</div><div class="gmail_extra"><br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div>
</div></div>