Scribit Victor Kryukov dies 15/04/2007 hora 19:03:
SBCL don't provide thread properties, so my first solution[1] was to create a hash-table and to assign each thread a connection, to check from every thread whether it already has a connection, and then to clean that hash-table periodically, closing connections for dead threads.
Now that I'm used to Lisp's first-class everything, I'd rather mimic it everywhere. For example, you could create a custom thread object whose creation not only starts a thread but takes care of creating a DB connection (or taking it out of a pool) and making it accessible in the thread, probably with a dynamic variable...
Quickly, Pierre