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
8a1acf2e
Kaydet (Commit)
8a1acf2e
authored
Mar 06, 2011
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
merge heads
üst
776e5861
125d5c87
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
NEWS
Misc/NEWS
+3
-0
_threadmodule.c
Modules/_threadmodule.c
+2
-2
No files found.
Misc/NEWS
Dosyayı görüntüle @
8a1acf2e
...
@@ -55,6 +55,9 @@ Core and Builtins
...
@@ -55,6 +55,9 @@ Core and Builtins
Library
Library
-------
-------
- Issue #11408: In threading.Lock.acquire(), only call gettimeofday() when
really necessary. Patch by Charles-François Natali.
- Issue #11391: Writing to a mmap object created with
- Issue #11391: Writing to a mmap object created with
``mmap.PROT_READ|mmap.PROT_EXEC`` would segfault instead of raising a
``mmap.PROT_READ|mmap.PROT_EXEC`` would segfault instead of raising a
TypeError. Patch by Charles-François Natali.
TypeError. Patch by Charles-François Natali.
...
...
Modules/_threadmodule.c
Dosyayı görüntüle @
8a1acf2e
...
@@ -54,8 +54,8 @@ acquire_timed(PyThread_type_lock lock, PY_TIMEOUT_T microseconds)
...
@@ -54,8 +54,8 @@ acquire_timed(PyThread_type_lock lock, PY_TIMEOUT_T microseconds)
_PyTime_timeval
endtime
;
_PyTime_timeval
endtime
;
_PyTime_gettimeofday
(
&
endtime
);
if
(
microseconds
>
0
)
{
if
(
microseconds
>
0
)
{
_PyTime_gettimeofday
(
&
endtime
);
endtime
.
tv_sec
+=
microseconds
/
(
1000
*
1000
);
endtime
.
tv_sec
+=
microseconds
/
(
1000
*
1000
);
endtime
.
tv_usec
+=
microseconds
%
(
1000
*
1000
);
endtime
.
tv_usec
+=
microseconds
%
(
1000
*
1000
);
}
}
...
@@ -76,7 +76,7 @@ acquire_timed(PyThread_type_lock lock, PY_TIMEOUT_T microseconds)
...
@@ -76,7 +76,7 @@ acquire_timed(PyThread_type_lock lock, PY_TIMEOUT_T microseconds)
/* If we're using a timeout, recompute the timeout after processing
/* If we're using a timeout, recompute the timeout after processing
* signals, since those can take time. */
* signals, since those can take time. */
if
(
microseconds
>
=
0
)
{
if
(
microseconds
>
0
)
{
_PyTime_gettimeofday
(
&
curtime
);
_PyTime_gettimeofday
(
&
curtime
);
microseconds
=
((
endtime
.
tv_sec
-
curtime
.
tv_sec
)
*
1000000
+
microseconds
=
((
endtime
.
tv_sec
-
curtime
.
tv_sec
)
*
1000000
+
(
endtime
.
tv_usec
-
curtime
.
tv_usec
));
(
endtime
.
tv_usec
-
curtime
.
tv_usec
));
...
...
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