[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Question regarding the XML parser binding in PIL
- From: Florian Weimer <fw@...>
- Date: Tue, 23 Dec 2008 00:38:56 +0100
* Doug Currie:
> In lsqlite3, http://luaforge.net/projects/luasqlite/ -- 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.