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
986eafdc
Kaydet (Commit)
986eafdc
authored
Ock 09, 2001
tarafından
Fred Drake
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Added missing word; fixed minor nits.
üst
37f1b34b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
libmutex.tex
Doc/lib/libmutex.tex
+4
-4
No files found.
Doc/lib/libmutex.tex
Dosyayı görüntüle @
986eafdc
% LaTeXed from comments in file
\section
{
\module
{
mutex
}
---
\section
{
\module
{
mutex
}
---
Mutual exclusion support
}
Mutual exclusion support
}
...
@@ -6,7 +5,7 @@
...
@@ -6,7 +5,7 @@
\sectionauthor
{
Moshe Zadka
}{
moshez@zadka.site.co.il
}
\sectionauthor
{
Moshe Zadka
}{
moshez@zadka.site.co.il
}
\modulesynopsis
{
Lock and queue for mutual exclusion.
}
\modulesynopsis
{
Lock and queue for mutual exclusion.
}
The
\module
{
mutex
}
defines a class that allows mutual-exclusion
The
\module
{
mutex
}
module
defines a class that allows mutual-exclusion
via acquiring and releasing locks. It does not require (or imply)
via acquiring and releasing locks. It does not require (or imply)
threading or multi-tasking, though it could be useful for
threading or multi-tasking, though it could be useful for
those purposes.
those purposes.
...
@@ -18,7 +17,7 @@ Create a new (unlocked) mutex.
...
@@ -18,7 +17,7 @@ Create a new (unlocked) mutex.
A mutex has two pieces of state --- a ``locked'' bit and a queue.
A mutex has two pieces of state --- a ``locked'' bit and a queue.
When the mutex is not locked, the queue is empty.
When the mutex is not locked, the queue is empty.
Otherwise, the queue contains
0
or more
Otherwise, the queue contains
zero
or more
\code
{
(
\var
{
function
}
,
\var
{
argument
}
)
}
pairs
\code
{
(
\var
{
function
}
,
\var
{
argument
}
)
}
pairs
representing functions (or methods) waiting to acquire the lock.
representing functions (or methods) waiting to acquire the lock.
When the mutex is unlocked while the queue is not empty,
When the mutex is unlocked while the queue is not empty,
...
@@ -27,7 +26,8 @@ the first queue entry is removed and its
...
@@ -27,7 +26,8 @@ the first queue entry is removed and its
implying it now has the lock.
implying it now has the lock.
Of course, no multi-threading is implied -- hence the funny interface
Of course, no multi-threading is implied -- hence the funny interface
for lock, where a function is called once the lock is acquired.
for
\method
{
lock()
}
, where a function is called once the lock is
acquired.
\end{classdesc}
\end{classdesc}
...
...
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