Ryan Barry has uploaded a new change for review. Change subject: Don't add callbacks to the queue if they're None ......................................................................
Don't add callbacks to the queue if they're None Fast threads with no actual callbacks they're waiting for can outrun the queue. If there's not a real callback, don't do anything. Change-Id: If1635275fab0c087114872c558446b790e4b2fe6 Signed-off-by: Ryan Barry <[email protected]> --- M src/ovirt/node/ui/urwid_builder.py 1 file changed, 6 insertions(+), 5 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/07/35607/1 diff --git a/src/ovirt/node/ui/urwid_builder.py b/src/ovirt/node/ui/urwid_builder.py index 377fc40..a23bf5c 100644 --- a/src/ovirt/node/ui/urwid_builder.py +++ b/src/ovirt/node/ui/urwid_builder.py @@ -462,11 +462,12 @@ def call(self, callback): """Run the callback in the context of the UI thread """ - self.logger.debug("Data: %s to %s - %s" % (callback, - dst._pipe_fd, - dst._pipe_q)) - dst._pipe_q.append(callback) - os.write(dst._pipe_fd, "Data!") + if callback: + self.logger.debug("Data: %s to %s - %s" % (callback, + dst._pipe_fd, + dst._pipe_q)) + dst._pipe_q.append(callback) + os.write(dst._pipe_fd, "Data!") return UrwidUIThreadConnection() -- To view, visit http://gerrit.ovirt.org/35607 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If1635275fab0c087114872c558446b790e4b2fe6 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-node Gerrit-Branch: master Gerrit-Owner: Ryan Barry <[email protected]> _______________________________________________ node-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/node-patches
