Yaniv Bronhaim has uploaded a new change for review.

Change subject: Changing threadName when using multiprocessing package
......................................................................

Changing threadName when using multiprocessing package

multiprocessing.manager adds current process name in front of current
threadName. This patch changes the name back to Thread-[No].

Change-Id: I541beb63fd5e1a2f7d6eed7f66f4970bf37a6705
Bug-Id: https://bugzilla.redhat.com/show_bug.cgi?id=868663
Signed-off-by: Yaniv Bronhaim <[email protected]>
---
M vdsm/supervdsmServer.py
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/37/9037/1

diff --git a/vdsm/supervdsmServer.py b/vdsm/supervdsmServer.py
index a1bf8e6..a5bfc68 100755
--- a/vdsm/supervdsmServer.py
+++ b/vdsm/supervdsmServer.py
@@ -74,6 +74,9 @@
 
     def wrapper(*args, **kwargs):
         try:
+            threadName = threading.current_thread().name
+            if threadName.find('|') != -1:
+                _, threading.current_thread().name = threadName.split('|')
             return func(*args, **kwargs)
         except:
             callbackLogger.error("Error in %s", func.__name__, exc_info=True)


--
To view, visit http://gerrit.ovirt.org/9037
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I541beb63fd5e1a2f7d6eed7f66f4970bf37a6705
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to