Nir Soffer has posted comments on this change.

Change subject: signals: Handle signals to non-main threads
......................................................................


Patch Set 10:

(2 comments)

http://gerrit.ovirt.org/#/c/29392/10/lib/vdsm/sigutils.py
File lib/vdsm/sigutils.py:

Line 74:     '''
Line 75:     This function acts like signal.pause(), it returns after a signal 
was
Line 76:     received and handled. Unlike signal.pause(), it will wake up even 
if other
Line 77:     thread caught the signal while this function was called.
Line 78:     A timeout can be specified to avoid waiting indefinitely.
Need to document the timeout - Python uses both seconds and milliseconds for 
similar interfaces.
Line 79: 
Line 80:     This function has to be called from the main thread.
Line 81:     '''
Line 82: 


Line 107:         except OSError as e:
Line 108:             if e.errno != errno.EINTR:
Line 109:                 if e.errno != errno.EAGAIN:
Line 110:                     logging.exception('Received error while reading 
from pipe')
Line 111:                 break
This is not clear. Lets make it simpler:

    if e.errno == EINTR:
        continue
    if e.errno != errno.EAGAIN
        logging.exception(...)
    break


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I5dbcd00cec22ef12f2b6253b016dcbd0aa889583
Gerrit-PatchSet: 10
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dima Kuznetsov <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Dima Kuznetsov <[email protected]>
Gerrit-Reviewer: Nir Soffer <[email protected]>
Gerrit-Reviewer: Saggi Mizrahi <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim <[email protected]>
Gerrit-Reviewer: Yeela Kaplan <[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