[Twisted-Python] Logging observers and threads
exarkun at twistedmatrix.com
exarkun at twistedmatrix.com
Fri Jul 13 09:48:23 EDT 2012
On 12 Jul, 07:33 pm, tobias.oberstein at tavendo.de wrote:
>>libuv is a giant pile of new, unaudited C code that didn't even have a
>>passing
>>test suite until a month or two ago. Please feel free to write a
>>reactor for it;
>
>> From what I've read, libuv has designed it's API around the pattern
>
>A. "do operation and get notified when done"
>
>instead of
>
>B. "get notified when ready and then do operation".
>
>The native Windows API is A., Posix the B and operation = read, write,
>open, stat, ..
>
>I think A. is more natural, since how do wait for a file to be ready to
>get open'ed/stat'ed?
This isn't really attacking the important part of the matter. I suppose
it's a necessary decision to make, but it still leaves 99% of the API
unspecified.
Twisted essentially always aims for A, so it's probably been an unspoken
assumption between the people (at least with whom I've been) discussing
this topic that this is what we'd want in Twisted.
Having answered that question, there's still the question of what
operations to provide and what the interface to those operations is.
For the recorded efforts so far, see this wiki page:
http://twistedmatrix.com/trac/wiki/Specification/AsynchronousFileInputOutput
which has been sitting, largely untouched, for several years now, due to
apparent lack of interest.
Rather than beginning the entire effort anew, I'd rather see additions
to and criticisms of the work done already.
Jean-Paul
More information about the Twisted-Python
mailing list