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.10:55:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1384340146.09.0.634328417781.issue19565@psf.upfronthosting.co.za>
In-reply-to
Content
> As close() on regular files, I would prefer to call explicitly cancel() 
> to control exactly when the overlapped operation is cancelled.

If you use daemon threads then you have no guarantee that the thread will ever get a chance to explicitly call cancel().

> Can't you fix multiprocessing and/or the unit test to ensure that all 
> overlapped operations are completed or cancelled?

On Vista and later, yes, this is done in the deallocator using CancelIoEx(), although there is still a warning.  On XP it is not possible because CancelIo() has to be called from the same thread which started the operation.

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.

(It might be possible to wake up blocked threads by setting the event handle returned by _PyOS_SigintEvent().  That might allow the use of non-daemon threads.)
History
Date User Action Args
2013-11-13 10:55:46sbtsetrecipients: + sbt, vstinner, neologix
2013-11-13 10:55:46sbtsetmessageid: <1384340146.09.0.634328417781.issue19565@psf.upfronthosting.co.za>
2013-11-13 10:55:46sbtlinkissue19565 messages
2013-11-13 10:55:45sbtcreate