Piotr Kliczewski has posted comments on this change.

Change subject: asyncore: Move generic reactor functionality
......................................................................


Patch Set 10:

(3 comments)

https://gerrit.ovirt.org/#/c/37055/10/lib/yajsonrpc/betterAsyncore.py
File lib/yajsonrpc/betterAsyncore.py:

Line 132: 
Line 133:         asyncore.file_dispatcher.close(self)
Line 134: 
Line 135: 
Line 136: class Reactor(object):
> nice. Some unit tests would make it even nicer :)
Done
Line 137:     def __init__(self):
Line 138:         self._map = {}
Line 139:         self._isRunning = False
Line 140:         self._wakeupEvent = AsyncoreEvent(self._map)


Line 135: 
Line 136: class Reactor(object):
Line 137:     def __init__(self):
Line 138:         self._map = {}
Line 139:         self._isRunning = False
> nit: should_we_use_pep8_names_here ?
Done
Line 140:         self._wakeupEvent = AsyncoreEvent(self._map)
Line 141: 
Line 142:     def add_dispatcher(self, disp):
Line 143:         disp.add_channel(self._map)


Line 150:         while self._isRunning:
Line 151:             asyncore.loop(timeout=.5, use_poll=True, map=self._map, 
count=1)
Line 152: 
Line 153:         for key, dispatcher in self._map.items():
Line 154:             del self._map[key]
> python3 warning: this will blow up as soon as we move to py3.
Will test and use suggested code.
Line 155:             dispatcher.close()
Line 156: 
Line 157:     def wakeup(self):
Line 158:         self._wakeupEvent.set()


-- 
To view, visit https://gerrit.ovirt.org/37055
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I59a14b18f4c08d873763e1d3bd9d42b99de05fb1
Gerrit-PatchSet: 10
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Saggi Mizrahi <smizr...@redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com>
Gerrit-Reviewer: Francesco Romani <from...@redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczew...@gmail.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybron...@redhat.com>
Gerrit-Reviewer: Yeela Kaplan <ykap...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to