From 35292968ed99c277f58040d62da5a99aee4feee2 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Tue, 8 Jan 2019 16:33:57 +0100 Subject: [PATCH] Made get_plugin lock reentrant --- platypush/context/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platypush/context/__init__.py b/platypush/context/__init__.py index 6b46449f..c7f96cfe 100644 --- a/platypush/context/__init__.py +++ b/platypush/context/__init__.py @@ -2,7 +2,7 @@ import asyncio import importlib import logging -from threading import Lock +from threading import RLock from ..config import Config @@ -73,7 +73,7 @@ def get_plugin(plugin_name, reload=False): global plugins_init_locks if plugin_name not in plugins_init_locks: - plugins_init_locks[plugin_name] = Lock() + plugins_init_locks[plugin_name] = RLock() if plugin_name in plugins and not reload: return plugins[plugin_name]