<div dir="ltr">Thanks for this! I'll have a look a little later - crazy day. It occurred to me that perhaps the automaton library wasn't re-entrant but I asked the developer and he thinks it is.<div><br></div><div style>
-Alan</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Sep 26, 2013 at 7:44 AM, Mark Evenson <span dir="ltr"><<a href="mailto:evenson@panix.com" target="_blank">evenson@panix.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 9/26/13 0728 , Alan Ruttenberg wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Howdy,<br>
<br>
I wonder if those of you have worked with threads might have a quick<br>
look to see if I am doing something stupid.<br>
<br>
<a href="https://lsw2.googlecode.com/svn/branches/bona/util/jargrep.lisp" target="_blank">https://lsw2.googlecode.com/<u></u>svn/branches/bona/util/<u></u>jargrep.lisp</a><br>
</blockquote>
<br></div>
I whacked away at your file, converting it to the attached form to use the JSS namespace and ABCL-ASDF to resolve the dk.brics.automaton artifact, but I can't get to seem the matches to occur. Not having your jar files to test, I just run it across Maven jars as follows:<br>
<br>
CL-USER> (jar-map-threads-automaton-<u></u>find "Manifest" (jss::all-jars-below "~/.m2"))<br>
12.295 seconds real time<br>
1897572 cons cells<br>
<br>
0<br>
0<br>
CL-USER> (length (jss::all-jars-below "~/.m2"))<br>
460<br>
<br>
which should result in matches for all jars, because every jar that Maven uses, has a manifest contains the string "Manifest-Version: 1.0". But I get no hits, and the execution is so fast, that I suspect that the matcher is not actually working on anything for some reason. Since you pass a closure with a reference to the regex as the function to THEREADS:MAKE-THREAD, trying to TRACE stuff doesn't seem to work so well.<br>
<br>
I need to spend more time with the matcher to understand why I am not generating any hits. Any ideas on your end?<br>
<br>
[…]<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The result of running this is about (and their's the rub) 20 key value<br>
pairs in the hash table (I had read that ABCL hash tables are thread<br>
safe). The problem is that different runs of this code on the same data<br>
get different numbers of key value pairs, between 13 and 24!<br>
</blockquote>
<br></div>
ABCL hashtables should indeed be thread-safe, with all accesses protected by an underlying java.util.concurrent.locks.<u></u>ReentrantLock.<div class="im"><br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I'm not sure whether I'm just not doing this the right way, in which<br>
case it would be very helpful to get an explanation of why not, or<br>
there's a problem somewhere in the implementation.<br>
</blockquote>
<br></div>
For the record, I used<br>
<br>
CL-USER> (lisp-implementation-version)<br>
"1.3.0-dev"<br>
"Java_HotSpot(TM)_64-Bit_<u></u>Server_VM-Oracle_Corporation-<u></u>1.7.0_40-b43"<br>
"amd64-Linux-2.6.18-348.16.1.<u></u>el5.centos.plus"<br>
<br>
to run my tests, but I have no reason to currently suspect the ABCL version is at fault here.<br>
<br>
More later when I get the time,<br>
Mark<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
<br>
<br>
-- <br>
"A screaming comes across the sky. It has happened before, but there<br>
is nothing to compare to it now."<br>
</font></span></blockquote></div><br></div>