mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-23 14:31:44 -07:00
switched from threading to multiprocessing
functions same, just keeping names from confusing people
This commit is contained in:
parent
df4912957c
commit
af68ae1e87
1 changed files with 2 additions and 2 deletions
4
lib/ansible/plugins/cache/memcached.py
vendored
4
lib/ansible/plugins/cache/memcached.py
vendored
|
@ -21,7 +21,7 @@ import collections
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
import threading
|
from multiprocessing import Lock
|
||||||
from itertools import chain
|
from itertools import chain
|
||||||
|
|
||||||
from ansible import constants as C
|
from ansible import constants as C
|
||||||
|
@ -53,7 +53,7 @@ class ProxyClientPool(object):
|
||||||
self._num_connections = 0
|
self._num_connections = 0
|
||||||
self._available_connections = collections.deque(maxlen=self.max_connections)
|
self._available_connections = collections.deque(maxlen=self.max_connections)
|
||||||
self._locked_connections = set()
|
self._locked_connections = set()
|
||||||
self._lock = threading.Lock()
|
self._lock = Lock()
|
||||||
|
|
||||||
def _check_safe(self):
|
def _check_safe(self):
|
||||||
if self.pid != os.getpid():
|
if self.pid != os.getpid():
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue