Francesco Romani has uploaded a new change for review.
Change subject: yajsonrpc: switch to concurrent.thread()
......................................................................
yajsonrpc: switch to concurrent.thread()
This patch:
1. replaces good usages of threading.Thread() with
more modern concurrent.thread()
2. replaces bad usages of threading.Thread() - inheritance
with composition, leveraging concurrent.thread()
there are no intended changes in behaviour.
Change-Id: I42841c79e70755c0be5455949e33b84006930af0
Signed-off-by: Francesco Romani <fromani(a)redhat.com>
---
M lib/yajsonrpc/stompreactor.py
1 file changed, 3 insertions(+), 4 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/62/61462/1
diff --git a/lib/yajsonrpc/stompreactor.py b/lib/yajsonrpc/stompreactor.py
index 509e251..9f4ad30 100644
--- a/lib/yajsonrpc/stompreactor.py
+++ b/lib/yajsonrpc/stompreactor.py
@@ -18,8 +18,8 @@
from collections import deque
from uuid import uuid4
import functools
-import threading
+from vdsm import concurrent
from vdsm import utils
from vdsm.config import config
from vdsm.compat import json
@@ -586,9 +586,8 @@
reactor = Reactor()
def start():
- thread = threading.Thread(target=reactor.process_requests,
- name='Client %s:%s' % (host, port))
- thread.setDaemon(True)
+ thread = concurrent.thread(reactor.process_requests,
+ name='Client %s:%s' % (host, port))
thread.start()
client = StompClient(utils.create_connected_socket(host, port, sslctx),
--
To view, visit
https://gerrit.ovirt.org/61462
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I42841c79e70755c0be5455949e33b84006930af0
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani(a)redhat.com>