Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/torch7.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/init.c
diff options
context:
space:
mode:
authorAdam Lerer <alerer@fb.com>2015-08-06 02:44:20 +0300
committerAdam Lerer <alerer@fb.com>2015-08-12 18:26:43 +0300
commita5a407964888298ab640b5c71a4cb5e517e40dfe (patch)
treec811db699bdd435acabb23c555785258dc4fbc5f /init.c
parente2b3cb5fddbe43b4fd13fa40e6b52d64fecebcf9 (diff)
Fix lua GC to support allocations across multiple threads (e.g. threads sharedserialize)
Diffstat (limited to 'init.c')
-rw-r--r--init.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/init.c b/init.c
index 9a41a98..ad2b257 100644
--- a/init.c
+++ b/init.c
@@ -47,19 +47,12 @@ static void luaTorchArgErrorHandlerFunction(int argNumber, const char *msg, void
luaL_argcheck(L, 0, argNumber, msg);
}
-static void luaTorchGCFunction(void *data)
-{
- lua_State *L = data;
- lua_gc(L, LUA_GCCOLLECT, 0);
-}
-
LUA_EXTERNC DLL_EXPORT int luaopen_libtorch(lua_State *L);
int luaopen_libtorch(lua_State *L)
{
THSetErrorHandler(luaTorchErrorHandlerFunction, L);
THSetArgErrorHandler(luaTorchArgErrorHandlerFunction, L);
- THSetGCHandler(luaTorchGCFunction, L);
lua_newtable(L);
lua_pushvalue(L, -1);