[PATCH 1 of 1] Replacing select.select() with os.fstat() which works also on windows

Zbynek Winkler zwin at users.sourceforge.net
Tue Sep 27 17:42:56 CDT 2005


Matt Mackall wrote:

>On Tue, Sep 27, 2005 at 09:05:38PM +0200, Zbynek Winkler wrote:
>  
>
>># HG changeset patch
>># User zbynek at alex.kolej.mff.cuni.cz
>># Node ID 838c97b17a4162fb508452ec08a32bb0e0078d5c
>># Parent  0e2be889ccd7eaf0c5c1f08b486e02be3ec7358f
>>Replacing select.select() with os.fstat() which works also on windows.
>>    
>>
>I like this. 
>
Great!

>It passes my hand run tests and the test suite except:
>  
>
>>-            for l in self.pipee:
>>-                self.ui.status("remote: ", l)
>>+            readerr()
>>    
>>
>This is intentionally blocking so that we read until the other end
>closes the pipe.
>  
>
Ok, I didn't know that (maybe add a little comment?) Actually during my 
testing on windows the __del__ method was never called. The 
documentation says that it is sometimes not called for objects that 
exist when the interpreter is shutting down. On windows it was not 
called and the threaded version didn't work because of that. The helper 
thread never ended because it was blocked reading the error output. Sigh 
:( This implementation is better anyway ;-)

Zbynek

-- 
http://zw.matfyz.cz/     http://robotika.cz/
Faculty of Mathematics and Physics, Charles University, Prague, Czech Republic



More information about the Mercurial mailing list