From 30857b8bd82f8f1941f4b1cc5de54344518f2c73 Mon Sep 17 00:00:00 2001 From: Sahid Orentino Ferdjaoui Date: Wed, 8 Jan 2025 16:41:40 +0100 Subject: [PATCH] hub: use native as default implementation Related-bug: #2087939 Change-Id: I3db88f43be1c09fcfcd3ed79adb06718a740404c Signed-off-by: Sahid Orentino Ferdjaoui --- os_ken/lib/hub.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/os_ken/lib/hub.py b/os_ken/lib/hub.py index c50b5600..2cd9e3e3 100644 --- a/os_ken/lib/hub.py +++ b/os_ken/lib/hub.py @@ -27,7 +27,7 @@ from os_ken.lib import ip # We don't bother to use cfg.py because monkey patch needs to be # called very early. Instead, we use an environment variable to # select the type of hub. -HUB_TYPE = os.getenv('OSKEN_HUB_TYPE', 'eventlet') +HUB_TYPE = os.getenv('OSKEN_HUB_TYPE', 'native') LOG = logging.getLogger('os_ken.lib.hub') @@ -249,12 +249,13 @@ if HUB_TYPE == 'eventlet': HubEvent = eventlet.event.Event elif HUB_TYPE == 'native': - LOG.warning("The native implementation is incomplete " - "and should not be used in production environments.") import threading import queue import time + def patch(thread=True): + pass + class HubThread(threading.Thread): def wait(self, timeout=None): self.join(timeout)