hub: use native as default implementation

Related-bug: #2087939
Change-Id: I3db88f43be1c09fcfcd3ed79adb06718a740404c
Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@industrialdiscipline.com>
This commit is contained in:
Sahid Orentino Ferdjaoui
2025-01-08 16:41:40 +01:00
parent 8195cd818c
commit 30857b8bd8

View File

@@ -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)