This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author sbt
Recipients neologix, sbt, vstinner
Date 2013-11-13.16:51:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <5283AE0E.9040702@gmail.com>
In-reply-to <1384355264.37.0.124034387642.issue19565@psf.upfronthosting.co.za>
Content
On 13/11/2013 3:07pm, STINNER Victor wrote:
>> On Vista and later, yes, this is done in the deallocator using
>> CancelIoEx(), although there is still a warning.
>
> I don't understand. The warning is emitted because an operating is not done nor cancelled. Why not cancel explicitly active operations in manager.shutdown()? It is not possible?

shutdown() will be run in a different thread to the ones which started 
the overlapped ops, so it cannot stop them using CancelIo().  And 
anyway, it would mean writing a separate implementation for Windows -- 
the current manager implementation contains no platform specific code.

Originally overlapped IO was not used on Windows.  But, to get rid of 
polling, Antoine opened the can of worms that is overlapped IO:-)

>> ... I think these warnings come from daemon threads used by "manager"
>> processes.  When the manager process exits some background threads
>> may be blocked doing an overlapped read.
>
> I don't know overlapped operations. There are not asynchronous? What do you mean by "blocked doing an overlapped read"?

They are asynchronous but the implementation uses a hidden thread pool. 
  If a pool thread tries to read from/write to a buffer that has been 
deallocated, then we can get a crash.

By "blocked doing an overlapped read" I mean that a daemon thread is 
waiting for a line like

     data = conn.recv()

to complete.
History
Date User Action Args
2013-11-13 16:51:40sbtsetrecipients: + sbt, vstinner, neologix
2013-11-13 16:51:40sbtlinkissue19565 messages
2013-11-13 16:51:39sbtcreate