Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
633db6f6
Kaydet (Commit)
633db6f6
authored
Kas 17, 2013
tarafından
Richard Oudkerk
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #19565: Prevent warnings at shutdown about pending overlapped ops.
üst
80b2aa0a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
8 deletions
+28
-8
_winapi.c
Modules/_winapi.c
+28
-8
No files found.
Modules/_winapi.c
Dosyayı görüntüle @
633db6f6
...
@@ -107,17 +107,37 @@ overlapped_dealloc(OverlappedObject *self)
...
@@ -107,17 +107,37 @@ overlapped_dealloc(OverlappedObject *self)
{
{
DWORD
bytes
;
DWORD
bytes
;
int
err
=
GetLastError
();
int
err
=
GetLastError
();
if
(
self
->
pending
)
{
if
(
self
->
pending
)
{
/* make it a programming error to deallocate while operation
is pending, even if we can safely cancel it */
if
(
check_CancelIoEx
()
&&
if
(
check_CancelIoEx
()
&&
Py_CancelIoEx
(
self
->
handle
,
&
self
->
overlapped
))
Py_CancelIoEx
(
self
->
handle
,
&
self
->
overlapped
)
&&
GetOverlappedResult
(
self
->
handle
,
&
self
->
overlapped
,
&
bytes
,
TRUE
);
GetOverlappedResult
(
self
->
handle
,
&
self
->
overlapped
,
&
bytes
,
TRUE
))
PyErr_SetString
(
PyExc_RuntimeError
,
{
"I/O operations still in flight while destroying "
/* The operation is no longer pending -- nothing to do. */
"Overlapped object, the process may crash"
);
}
PyErr_WriteUnraisable
(
NULL
);
else
if
(
_Py_Finalizing
==
NULL
)
{
/* The operation is still pending -- give a warning. This
will probably only happen on Windows XP. */
PyErr_SetString
(
PyExc_RuntimeError
,
"I/O operations still in flight while destroying "
"Overlapped object, the process may crash"
);
PyErr_WriteUnraisable
(
NULL
);
}
else
{
/* The operation is still pending, but the process is
probably about to exit, so we need not worry too much
about memory leaks. Leaking self prevents a potential
crash. This can happen when a daemon thread is cleaned
up at exit -- see #19565. We only expect to get here
on Windows XP. */
CloseHandle
(
self
->
overlapped
.
hEvent
);
SetLastError
(
err
);
return
;
}
}
}
CloseHandle
(
self
->
overlapped
.
hEvent
);
CloseHandle
(
self
->
overlapped
.
hEvent
);
SetLastError
(
err
);
SetLastError
(
err
);
if
(
self
->
write_buffer
.
obj
)
if
(
self
->
write_buffer
.
obj
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment