On 03/01/2018 15:48, Richard Hipp wrote:
On 1/3/18, Lifepillar <[email protected]> wrote:
Consider an extension that has some shared state, say a global `context`
struct, whose value is used by a few user-defined SQL functions.
Besides, assume that there are other SQL functions that can act on the
global context.

The question is: how do I turn this into a thread-safe extension?

Should I use SQLite3 mutex functions to guarantee exclusive access to
shared state? Or should I define my own locks?

Either approach will work.  Which is easiest for you?

If SQLite3 locks may be used in loadable extensions, it is fine with me.

Thanks for the quick feedback!
Life.


_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to