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
b26a9b10
Kaydet (Commit)
b26a9b10
authored
Ock 25, 2013
tarafından
Martin v. Löwis
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Replace WaitForSingleObject with WaitForSingleObjectEx,
for better WinRT compatibility.
üst
3f50bf65
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
7 additions
and
7 deletions
+7
-7
semaphore.c
Modules/_multiprocessing/semaphore.c
+2
-2
timemodule.c
Modules/timemodule.c
+1
-1
launcher.c
PC/launcher.c
+1
-1
myreadline.c
Parser/myreadline.c
+1
-1
condvar.h
Python/condvar.h
+1
-1
thread_nt.h
Python/thread_nt.h
+1
-1
No files found.
Modules/_multiprocessing/semaphore.c
Dosyayı görüntüle @
b26a9b10
...
...
@@ -43,7 +43,7 @@ _GetSemaphoreValue(HANDLE handle, long *value)
{
long
previous
;
switch
(
WaitForSingleObject
(
handle
,
0
))
{
switch
(
WaitForSingleObject
Ex
(
handle
,
0
,
FALSE
))
{
case
WAIT_OBJECT_0
:
if
(
!
ReleaseSemaphore
(
handle
,
1
,
&
previous
))
return
MP_STANDARD_ERROR
;
...
...
@@ -99,7 +99,7 @@ semlock_acquire(SemLockObject *self, PyObject *args, PyObject *kwds)
}
/* check whether we can acquire without releasing the GIL and blocking */
if
(
WaitForSingleObject
(
self
->
handle
,
0
)
==
WAIT_OBJECT_0
)
{
if
(
WaitForSingleObject
Ex
(
self
->
handle
,
0
,
FALSE
)
==
WAIT_OBJECT_0
)
{
self
->
last_tid
=
GetCurrentThreadId
();
++
self
->
count
;
Py_RETURN_TRUE
;
...
...
Modules/timemodule.c
Dosyayı görüntüle @
b26a9b10
...
...
@@ -1574,7 +1574,7 @@ floatsleep(double secs)
DWORD
rc
;
HANDLE
hInterruptEvent
=
_PyOS_SigintEvent
();
ResetEvent
(
hInterruptEvent
);
rc
=
WaitForSingleObject
(
hInterruptEvent
,
ul_millis
);
rc
=
WaitForSingleObject
Ex
(
hInterruptEvent
,
ul_millis
,
FALSE
);
if
(
rc
==
WAIT_OBJECT_0
)
{
Py_BLOCK_THREADS
errno
=
EINTR
;
...
...
PC/launcher.c
Dosyayı görüntüle @
b26a9b10
...
...
@@ -535,7 +535,7 @@ run_child(wchar_t * cmdline)
error
(
RC_CREATE_PROCESS
,
L"Unable to create process using '%s'"
,
cmdline
);
AssignProcessToJobObject
(
job
,
pi
.
hProcess
);
CloseHandle
(
pi
.
hThread
);
WaitForSingleObject
(
pi
.
hProcess
,
INFINIT
E
);
WaitForSingleObject
Ex
(
pi
.
hProcess
,
INFINITE
,
FALS
E
);
ok
=
GetExitCodeProcess
(
pi
.
hProcess
,
&
rc
);
if
(
!
ok
)
error
(
RC_CREATE_PROCESS
,
L"Failed to get exit code of process"
);
...
...
Parser/myreadline.c
Dosyayı görüntüle @
b26a9b10
...
...
@@ -68,7 +68,7 @@ my_fgets(char *buf, int len, FILE *fp)
*/
if
(
GetLastError
()
==
ERROR_OPERATION_ABORTED
)
{
hInterruptEvent
=
_PyOS_SigintEvent
();
switch
(
WaitForSingleObject
(
hInterruptEvent
,
10
))
{
switch
(
WaitForSingleObject
Ex
(
hInterruptEvent
,
10
,
FALSE
))
{
case
WAIT_OBJECT_0
:
ResetEvent
(
hInterruptEvent
);
return
1
;
/* Interrupt */
...
...
Python/condvar.h
Dosyayı görüntüle @
b26a9b10
...
...
@@ -242,7 +242,7 @@ _PyCOND_WAIT_MS(PyCOND_T *cv, PyMUTEX_T *cs, DWORD ms)
* but we are safe because we are using a semaphore wich has an internal
* count.
*/
wait
=
WaitForSingleObject
(
cv
->
sem
,
ms
);
wait
=
WaitForSingleObject
Ex
(
cv
->
sem
,
ms
,
FALSE
);
PyMUTEX_LOCK
(
cs
);
if
(
wait
!=
WAIT_OBJECT_0
)
--
cv
->
waiting
;
...
...
Python/thread_nt.h
Dosyayı görüntüle @
b26a9b10
...
...
@@ -130,7 +130,7 @@ FreeNonRecursiveMutex(PNRMUTEX mutex)
DWORD
EnterNonRecursiveMutex
(
PNRMUTEX
mutex
,
DWORD
milliseconds
)
{
return
WaitForSingleObject
(
mutex
,
milliseconds
);
return
WaitForSingleObject
Ex
(
mutex
,
milliseconds
,
FALSE
);
}
BOOL
...
...
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