<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.3.2">
</HEAD>
<BODY>
Ian is working on this; I think significant progress will be made when he finishes his check-in.<BR>
<BR>
The biggest problem is that serializer uses globals in such a way that it is not thread-safe;<BR>
Ian is specifically rewriting that.<BR>
<BR>
I personally solve problem by using SBCL mutexes around the serialize/deserialize code, <BR>
but I have not committed that code, since it is highly SBCL-specific, and in fact I don't <BR>
know of a good way to do locking portably.<BR>
<BR>
The CL-SQL backend also has a problem with multi-threading. I have a local, SBCL solution<BR>
that uses a hash-map to create a separate connection for each thread in which a controller<BR>
is used. I have not committed this for the same reasons (and a touch of laziness.)<BR>
<BR>
So to answer your question fully:<BR>
<BR>
1) For BDB-based usage, we need to wait for Ian to finish the work that currently is underway.<BR>
2) For CL-SQL based usage, we need some sort of portable thread/lock solution, or at least<BR>
a switch that says "for SBCL, do this", and we need for me, or somebody else, to supply that <BR>
code.<BR>
<BR>
Can you recommend a portable approach to the threading problem? I personally only use SBCL,<BR>
and I think Ian uses Allegro. We can stand on our heads if we have to to keep SBCL both <BR>
portable and threadsafe, but I need expert advice on dealing with this.<BR>
<BR>
And, BTW, I doubt the serializer was ever threadsafe. If you use BDB, you can go along time<BR>
before you ever notice a problem; but of course we want an enterprise-quality system and so <BR>
must have complete thead-safety eventually.<BR>
<BR>
<BR>
<BR>
<BR>
On Sat, 2007-01-20 at 20:42 +0100, Gábor Melis wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">The fine manual at </FONT>
<FONT COLOR="#000000"><A HREF="http://common-lisp.net/project/elephant/doc/Threading.html">http://common-lisp.net/project/elephant/doc/Threading.html</A> says that </FONT>
<FONT COLOR="#000000">run-elephant-thread is broken but leaves the consequences to my </FONT>
<FONT COLOR="#000000">imagination.</FONT>
<FONT COLOR="#000000">Considering the comment about specials for buffers and such as well, my </FONT>
<FONT COLOR="#000000">reading is that there is no official way of using elephant from </FONT>
<FONT COLOR="#000000">multithreaded code.</FONT>
<FONT COLOR="#000000">Is that right?</FONT>
<FONT COLOR="#000000">What needs to be done to make run-elephant-thread safe again?</FONT>
<FONT COLOR="#000000">Gabor Melis</FONT>
<FONT COLOR="#000000">_______________________________________________</FONT>
<FONT COLOR="#000000">elephant-devel site list</FONT>
<FONT COLOR="#000000"><A HREF="mailto:elephant-devel@common-lisp.net">elephant-devel@common-lisp.net</A></FONT>
<FONT COLOR="#000000"><A HREF="http://common-lisp.net/mailman/listinfo/elephant-devel">http://common-lisp.net/mailman/listinfo/elephant-devel</A></FONT>
</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>