diff options
author | Benoit Germain <bnt.germain@gmail.com> | 2012-11-21 21:06:19 +0100 |
---|---|---|
committer | Benoit Germain <bnt.germain@gmail.com> | 2012-11-21 21:06:19 +0100 |
commit | f154e1f1b6cea07163f364986fb11ccfcb87c3ad (patch) | |
tree | 530495592fb8cf6300f5270626ced31a43c6313d /src/keeper.h | |
parent | 8c73ca05a8a6583844f7da90f3d8d1b2663a86a5 (diff) | |
download | lanes-3.4.0.tar.gz lanes-3.4.0.tar.bz2 lanes-3.4.0.zip |
fix application shutdown crash by not registering anything with atexit()v3.4.0
Diffstat (limited to '')
-rw-r--r-- | src/keeper.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/keeper.h b/src/keeper.h index a9b5a22..decae4a 100644 --- a/src/keeper.h +++ b/src/keeper.h | |||
@@ -8,7 +8,16 @@ struct s_Keeper | |||
8 | //int count; | 8 | //int count; |
9 | }; | 9 | }; |
10 | 10 | ||
11 | // if enabled, call close_keepers at the very last as we want to be sure no thread is GCing after. | ||
12 | // (and therefore may perform linda object dereferencing after keepers are gone) | ||
13 | // problem: maybe on some platforms (linux) atexit() is called after DLL/so are unloaded... | ||
14 | #define HAVE_KEEPER_ATEXIT_DESINIT 0 | ||
15 | |||
11 | char const* init_keepers( int const _nbKeepers, lua_CFunction _on_state_create); | 16 | char const* init_keepers( int const _nbKeepers, lua_CFunction _on_state_create); |
17 | #if !HAVE_KEEPER_ATEXIT_DESINIT | ||
18 | void close_keepers( void); | ||
19 | #endif // HAVE_KEEPER_ATEXIT_DESINIT | ||
20 | |||
12 | void populate_keepers( lua_State *L); | 21 | void populate_keepers( lua_State *L); |
13 | struct s_Keeper *keeper_acquire( const void *ptr); | 22 | struct s_Keeper *keeper_acquire( const void *ptr); |
14 | void keeper_release( struct s_Keeper *K); | 23 | void keeper_release( struct s_Keeper *K); |