[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: GC and threads
- From: "Hassink, Brian" <BHassink@...>
- Date: Tue, 27 Apr 2004 13:31:12 -0700
Hi,
If I have a thread that is currently blocked on a lua_yield() call, is there a way to invalidate the thread (via the C API) such that it will be garbage collected?
I'm creating and destroying C++ objects that have Lua threads associated with them. When a C++ object is destroyed, it's associated Lua thread will never resume, and I suspect will never be garbage collected as a result. I'd like to avoid passing in a special parameter via the lua_resume() call to tell the thread to exit it's main loop.
I'm experiencing a crash in Lua after roughly 50 threads are orphaned as described above, and I try to create more.
Cheers,
Brian