[libpeas] Document that the lua5.1 plugin loader is not thread-safe
- From: Garrett Regier <gregier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libpeas] Document that the lua5.1 plugin loader is not thread-safe
- Date: Tue, 18 Nov 2014 18:38:22 +0000 (UTC)
commit b4664d44f991fd86e5c08627df6120c49dba1245
Author: Garrett Regier <garrett regier riftio com>
Date: Sat Nov 8 11:14:15 2014 -0800
Document that the lua5.1 plugin loader is not thread-safe
https://bugzilla.gnome.org/show_bug.cgi?id=739619
libpeas/peas-engine.c | 4 ++++
loaders/lua5.1/peas-plugin-loader-lua.c | 4 ++++
2 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/libpeas/peas-engine.c b/libpeas/peas-engine.c
index c6b7043..92cf055 100644
--- a/libpeas/peas-engine.c
+++ b/libpeas/peas-engine.c
@@ -685,6 +685,10 @@ get_plugin_loader (PeasEngine *engine,
* peas_engine_enable_loader (engine, "python");
* ]|
*
+ * Unlike the C, python and python3 plugin loaders the lua5.1 plugin
+ * loader can only be used from a single thread. Should this happen
+ * a deadlock will occur.
+ *
* Due to the use of toggle references in the python and python3
* bindings only one of them should be enabled. Otherwise vast
* memory leaks are to be expected and as such it is an error to
diff --git a/loaders/lua5.1/peas-plugin-loader-lua.c b/loaders/lua5.1/peas-plugin-loader-lua.c
index ccc0ad0..66e0838 100644
--- a/loaders/lua5.1/peas-plugin-loader-lua.c
+++ b/loaders/lua5.1/peas-plugin-loader-lua.c
@@ -335,6 +335,10 @@ peas_plugin_loader_lua_initialize (PeasPluginLoader *loader)
PeasPluginLoaderLua *lua_loader = PEAS_PLUGIN_LOADER_LUA (loader);
lua_State *L;
+ /* Add locking to support global plugin loaders.
+ * Blocked by: https://github.com/pavouk/lgi/issues/92
+ */
+
L = luaL_newstate ();
if (L == NULL)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]