Nir Soffer has posted comments on this change.

Change subject: netlink: Introduce socket pool
......................................................................


Patch Set 7: Code-Review+1

(1 comment)

Other then easier to debug put_nowait() when returning a socket to the queue, 
looks good.

http://gerrit.ovirt.org/#/c/24603/7/lib/vdsm/netlink.py
File lib/vdsm/netlink.py:

Line 101:                 sock = _open_socket()
Line 102:             try:
Line 103:                 yield sock
Line 104:             finally:
Line 105:                 self._sockets.put(sock)
If we have a bug in the code limiting the number of threads, this will block 
silently until some other thread will take a socket from the queue.

Better use put_nowait() so which will raise Queue.Full in this impossible case.
Line 106: 
Line 107: 
Line 108: _pool = NLSocketPool(_POOL_SIZE)
Line 109: 


-- 
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: 7
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <[email protected]>
Gerrit-Reviewer: Adam Litke <[email protected]>
Gerrit-Reviewer: Antoni Segura Puimedon <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Nir Soffer <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to