marijnh / Postmodern

A Common Lisp PostgreSQL programming interface
http://marijnhaverbeke.nl/postmodern
Other
392 stars 90 forks source link

Fixed to make next-id thread safe #351

Closed hxzrx closed 1 month ago

hxzrx commented 1 month ago

I ran into the problem that when I had queries prepared in the threads, the argument was passed to another prepared statement in the DBMS. Finally I found out that next-statement-id was not thread safe and caused this problem.

This commit added a lock to make sure that the closure variable next-id is thread safe.