<br><br><div class="gmail_quote">On Thu, Feb 4, 2010 at 9:04 AM, Tobias C. Rittweiler <span dir="ltr"><<a href="mailto:tcr@freebits.de">tcr@freebits.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Juan Jose Garcia-Ripoll<br>
<div class="im"><<a href="mailto:juanjose.garciaripoll@googlemail.com">juanjose.garciaripoll@googlemail.com</a>> writes:<br>
<br>
> ... if it can be called so.<br>
><br>
> SBCL has opted to make all make all structures unprotected against<br>
> concurrent access. That means hashtables, arrays, and other structures have<br>
> to be managed by the user taking into account the fact that different<br>
> threads may try to read / write to them. In other words, those structures do<br>
> not have mutexes, locks, semaphores, etc.<br>
><br>
> I would like to copy that idea in ECL, cleaning up and simplifying the<br>
> hashtables code.<br>
><br>
> Anybody is against it? Why?<br>
><br>
> Juanjo<br>
<br>
</div>SBCL provides :SYNCHRONIZED T for MAKE-HASH-TABLE. For some other<br>
things, it has big outside locks (e.g. package operations.)<br>
<br>
In my experience, it's very nice when you can just add a ":synchronized<br>
t" to a constructor, and can use the data structure as is -- that is you<br>
do not need to create a new data structure with new accessors functions,<br>
etc.pp.</blockquote><div><br></div><div>The question is what brings you that "synchronized" and what guarantees it offers. This flag is _now_ only used at the reading of a hash table, not during writes, and there the cost is larger than in previous implementations because it involves creating a lock instead of reusing a global one, as a user would do. So the current implementation is definitely too lenient for practical use, I would say.</div>
</div><div><br></div>Juanjo<br clear="all"><br>-- <br>Instituto de Física Fundamental, CSIC<br>c/ Serrano, 113b, Madrid 28006 (Spain) <br><a href="http://juanjose.garciaripoll.googlepages.com">http://juanjose.garciaripoll.googlepages.com</a><br>