Change in vdsm[master]: netlink: Introduce socket pool
asegurap at redhat.com
asegurap at redhat.com
Fri Feb 21 12:22:20 UTC 2014
Antoni Segura Puimedon has posted comments on this change.
Change subject: netlink: Introduce socket pool
......................................................................
Patch Set 5:
(1 comment)
http://gerrit.ovirt.org/#/c/24603/5/lib/vdsm/netlink.py
File lib/vdsm/netlink.py:
Line 100: with self._semaphore:
Line 101: try:
Line 102: sock = self._sockets.pop()
Line 103: except KeyError:
Line 104: sock = _open_socket()
> Right - my suggestion was wrong.
That's a good point, I'm moving from set to Queue, which is inherently thread safe.
Line 105: try:
Line 106: yield sock
Line 107: finally:
Line 108: self._sockets.add(sock)
--
To view, visit http://gerrit.ovirt.org/24603
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I657ac3d3e0c2661ce73bdef9aa807ead888a42eb
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <asegurap 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: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list