flightaware / speedtables

Speed tables is a high-performance memory-resident database. The speed table compiler reads a table definition and generates a set of C access routines to create, manipulate and search tables containing millions of rows. Currently oriented towards Tcl.

Home Page:https://flightaware.github.io/speedtables/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

speedtable thread safety

apnadkarni opened this issue · comments

Not sure if this is a bug or a known limitation. The generated code is not thread safe. I understand that with Tcl's thread/interp model, a speedtable cannot be accessed from multiple threads. However, because of the use of static caches (e.g. for allocation of rows), it is not safe to even access different speedtables from different threads.

Docs don't talk about this much

/Ashok

It is a known limitation, but we will accept git pull requests that contribute thread-safety fixes.

It probably makes sense to do this as one of the goals of the new cpp branch. Some of my work there was to begin looking at how the static global speedtablesAssocData was being used, though I didn't make any major changes to it yet.