[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Why are lua_lock() and all macros?
- From: Tuomo Valkonen <tuomov@...>
- Date: Mon, 14 Apr 2003 15:48:41 +0300
I was thinking of adding thread support to my application (the Ion
window manager) that was recently converted to use Lua for configuration
and scripting. Threads would be needed in some Lua callbacks for tasks
that scan the file system and should not block the app from processing
other events. The problem in implementing this is that it appears that
the user would have to recompile the Lua library to support threads.
So, my question is why are lua_lock(), lua_unlock() and whatever macros?
Wouldn't it make more sense to add a function lua_setthreadfns(), say,
that could be called runtime to set callbacks for these if threads are
needed?
PS. As I'm new on this list--and to Lua--I must say that in the short
time I've used the language, I've really begun to admire it.
The standard libraries need more work and functions, though.
--
Tuomo