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
8784bae6
Kaydet (Commit)
8784bae6
authored
Mar 15, 2007
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Patch #1680978: consistently use "alive" instead of "active" in the
thread lib doc.
üst
72d9eec1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
24 deletions
+20
-24
libthreading.tex
Doc/lib/libthreading.tex
+20
-24
No files found.
Doc/lib/libthreading.tex
Dosyayı görüntüle @
8784bae6
...
...
@@ -15,10 +15,9 @@ situations where \module{threading} cannot be used because
This module defines the following functions and objects:
\begin{funcdesc}
{
activeCount
}{}
Return the number of
currently active
\class
{
Thread
}
objects.
The
returned count is equal to the length of the list returned by
Return the number of
\class
{
Thread
}
objects currently alive. The
returned count is equal to the length of the list returned by
\function
{
enumerate()
}
.
A function that returns the number of currently active threads.
\end{funcdesc}
\begin{funcdesc}
{
Condition
}{}
...
...
@@ -36,10 +35,10 @@ is returned.
\end{funcdesc}
\begin{funcdesc}
{
enumerate
}{}
Return a list of all
currently active
\class
{
Thread
}
objects.
The list includes daemonic threads, dummy thread objects created
by
\function
{
currentThread()
}
, and the main thread. It excludes terminated
threads and threads that have not yet been started.
Return a list of all
\class
{
Thread
}
objects currently alive. The list
includes daemonic threads, dummy thread objects created by
\function
{
currentThread()
}
, and the main thread. It excludes
t
erminated t
hreads and threads that have not yet been started.
\end{funcdesc}
\begin{funcdesc}
{
Event
}{}
...
...
@@ -526,12 +525,9 @@ calling the thread's \method{start()} method. This invokes the
\method
{
run()
}
method in a separate thread of control.
Once the thread's activity is started, the thread is considered
'alive' and 'active' (these concepts are almost, but not quite
exactly, the same; their definition is intentionally somewhat
vague). It stops being alive and active when its
\method
{
run()
}
method terminates -- either normally, or by raising an unhandled
exception. The
\method
{
isAlive()
}
method tests whether the thread is
alive.
'alive'. It stops being alive when its
\method
{
run()
}
method terminates
-- either normally, or by raising an unhandled exception. The
\method
{
isAlive()
}
method tests whether the thread is alive.
Other threads can call a thread's
\method
{
join()
}
method. This blocks
the calling thread until the thread whose
\method
{
join()
}
method is
...
...
@@ -551,14 +547,13 @@ There is a ``main thread'' object; this corresponds to the
initial thread of control in the Python program. It is not a
daemon thread.
There is the possibility that ``dummy thread objects'' are
created. These are thread objects corresponding to ``alien
threads''. These are threads of control started outside the
threading module, such as directly from C code. Dummy thread objects
have limited functionality; they are always considered alive,
active, and daemonic, and cannot be
\method
{
join()
}
ed. They are never
deleted, since it is impossible to detect the termination of alien
threads.
There is the possibility that ``dummy thread objects'' are created.
These are thread objects corresponding to ``alien threads'', which
are threads of control started outside the threading module, such as
directly from C code. Dummy thread objects have limited
functionality; they are always considered alive and daemonic, and
cannot be
\method
{
join()
}
ed. They are never deleted, since it is
impossible to detect the termination of alien threads.
\begin{classdesc}
{
Thread
}{
group=None, target=None, name=None,
...
...
@@ -646,7 +641,8 @@ name. The initial name is set by the constructor.
Return whether the thread is alive.
Roughly, a thread is alive from the moment the
\method
{
start()
}
method
returns until its
\method
{
run()
}
method terminates.
returns until its
\method
{
run()
}
method terminates. The module
function
\function
{
enumerate()
}
returns a list of all alive threads.
\end{methoddesc}
\begin{methoddesc}
{
isDaemon
}{}
...
...
@@ -659,8 +655,8 @@ This must be called before \method{start()} is called.
The initial value is inherited from the creating thread.
The entire Python program exits when no a
ctive non-daemon
threads are
left.
The entire Python program exits when no a
live non-daemon threads are
left.
\end{methoddesc}
...
...
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