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
8fdc75ba
Kaydet (Commit)
8fdc75ba
authored
Nis 07, 2002
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Lock methods acquire() and locked() now return bools.
üst
7f7666ff
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
threadmodule.c
Modules/threadmodule.c
+7
-7
No files found.
Modules/threadmodule.c
Dosyayı görüntüle @
8fdc75ba
...
...
@@ -68,17 +68,17 @@ lock_PyThread_acquire_lock(lockobject *self, PyObject *args)
return
Py_None
;
}
else
return
Py
Int
_FromLong
((
long
)
i
);
return
Py
Bool
_FromLong
((
long
)
i
);
}
static
char
acquire_doc
[]
=
"acquire([wait]) -> None or
Boolean
\n
\
"acquire([wait]) -> None or
bool
\n
\
(PyThread_acquire_lock() is an obsolete synonym)
\n
\
\n
\
Lock the lock. Without argument, this blocks if the lock is already
\n
\
locked (even by the same thread), waiting for another thread to release
\n
\
the lock, and return None
when
the lock is acquired.
\n
\
With a
Boolea
n argument, this will only block if the argument is true,
\n
\
the lock, and return None
once
the lock is acquired.
\n
\
With an argument, this will only block if the argument is true,
\n
\
and the return value reflects whether the lock is acquired.
\n
\
The blocking operation is not interruptible."
;
...
...
@@ -110,13 +110,13 @@ lock_locked_lock(lockobject *self)
{
if
(
PyThread_acquire_lock
(
self
->
lock_lock
,
0
))
{
PyThread_release_lock
(
self
->
lock_lock
);
return
Py
Int
_FromLong
(
0L
);
return
Py
Bool
_FromLong
(
0L
);
}
return
Py
Int
_FromLong
(
1L
);
return
Py
Bool
_FromLong
(
1L
);
}
static
char
locked_doc
[]
=
"locked() ->
Boolean
\n
\
"locked() ->
bool
\n
\
(locked_lock() is an obsolete synonym)
\n
\
\n
\
Return whether the lock is in the locked state."
;
...
...
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