Change in vdsm[master]: threadLocal: Cleanup thread local storage

nsoffer at redhat.com nsoffer at redhat.com
Wed Feb 12 14:17:24 UTC 2014


Nir Soffer has posted comments on this change.

Change subject: threadLocal: Cleanup thread local storage
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.ovirt.org/#/c/24309/1/vdsm/storage/threadPool.py
File vdsm/storage/threadPool.py:

Line 216:         it, calling the callback if any.  """
Line 217: 
Line 218:         while not self.__isDying:
Line 219:             self._processNextTask()
Line 220:             vars.task = None
> Can we follow the first rule of garbage collection: the entity which has se
I would also like to have that instead, but I could not find how to do it in task.py and storage_mailbox.py. Using the worker thread for this was the simplest way to ensure that this thread local storage is clean when finishing with a task.

Do you like a separate patch (bellow this one), fixing task to set vars.task in __init__, and remove on some method that is always called on the task?
Line 221: 
Line 222:     def goAway(self):
Line 223: 
Line 224:         """ Exit the run loop next time through."""


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I97b110db1c5f94e8561b4ba15a3c27b43043ed6f
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list