Message202761
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. |
|
Date |
User |
Action |
Args |
2013-11-13 16:51:40 | sbt | set | recipients:
+ sbt, vstinner, neologix |
2013-11-13 16:51:40 | sbt | link | issue19565 messages |
2013-11-13 16:51:39 | sbt | create | |
|