Merge "Disable greenthreads for RabbitDriver "listen" connections" into stable/2023.1
This commit is contained in:
commit
b8b4375885
@ -651,6 +651,8 @@ class Connection(object):
|
||||
# if it was already monkey patched by eventlet/greenlet.
|
||||
global threading
|
||||
threading = _utils.stdlib_threading
|
||||
amqpdriver.threading = _utils.stdlib_threading
|
||||
amqpdriver.queue = _utils.stdlib_queue
|
||||
|
||||
self.direct_mandatory_flag = driver_conf.direct_mandatory_flag
|
||||
|
||||
|
@ -14,6 +14,7 @@
|
||||
# under the License.
|
||||
|
||||
import logging
|
||||
import queue
|
||||
import threading
|
||||
|
||||
from oslo_utils import eventletutils
|
||||
@ -26,12 +27,14 @@ if eventlet and eventletutils.is_monkey_patched("thread"):
|
||||
# Here we initialize module with the native python threading module
|
||||
# if it was already monkey patched by eventlet/greenlet.
|
||||
stdlib_threading = eventlet.patcher.original('threading')
|
||||
stdlib_queue = eventlet.patcher.original('queue')
|
||||
else:
|
||||
# Manage the case where we run this driver in a non patched environment
|
||||
# and where user even so configure the driver to run heartbeat through
|
||||
# a python thread, if we don't do that when the heartbeat will start
|
||||
# we will facing an issue by trying to override the threading module.
|
||||
stdlib_threading = threading
|
||||
stdlib_queue = queue
|
||||
|
||||
|
||||
def version_is_compatible(imp_version, version):
|
||||
|
Loading…
x
Reference in New Issue
Block a user