Saggi Mizrahi has posted comments on this change.

Change subject: utils: Create AsyncProcessOperation
......................................................................


Patch Set 9:

(1 comment)

....................................................
File lib/vdsm/utils.py
Line 914: 
Line 915:             time.sleep(sleep)
Line 916: 
Line 917: 
Line 918: class AsyncProcessOperation(object):
This is supposed to Wrap AsyncProc abstracting the fact that it's a process 
giving the appearance of a Future[1] object.

AsyncProc is a low level implementation for accessing a subprocess' streams 
asynchronously.

For example, A wrapper around DD will use AsyncProc and give a different 
interface (add ability to inspect progress information, not have result()).

You should return an AsyncProcessOperation instead of an AsyncProc when you 
want to hide the fact that you are using a sub-process to the user[2].

- [1] https://en.wikipedia.org/wiki/Call_by_future#Call_by_future
- [2] https://en.wikipedia.org/wiki/Abstraction_layer
Line 919:     def __init__(self, proc, resultParser=None):
Line 920:         """Wraps a running process operation.
Line 921: 
Line 922:         resultParser should be of type callback(rc, out, err) and can 
return


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I79d0eefc9d917a4a93916d52867fb4f1e793c60e
Gerrit-PatchSet: 9
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Saggi Mizrahi <smizr...@redhat.com>
Gerrit-Reviewer: Ayal Baron <aba...@redhat.com>
Gerrit-Reviewer: Barak Azulay <bazu...@redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com>
Gerrit-Reviewer: Eduardo <ewars...@redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimo...@redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizr...@redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybron...@redhat.com>
Gerrit-Reviewer: Yeela Kaplan <ykap...@redhat.com>
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