lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

* Doug Currie:

> In lsqlite3, --  which is not
> the subject of this thread (to overload that word even further), but
> which implements the same glue as the discussed wrapper lua-sqlite3,
> we use the following approach:
> When the database's userdata handle is created we record the caller's
> L in the database's userdata handle.

> So, the rule is: as long as the Lua thread that created the database
> handle remains active, the callback can be used from any Lua thread.

I couldn't cause it to crash while adhering to that constraint.
However, ignoring it makes it extremely easy to cause a crash.  I
think it might be a good idea to allocate a separate thread after all.