]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/mutex.tex
Changed files to work with wxDataFormat
[wxWidgets.git] / docs / latex / wx / mutex.tex
1 \section{\class{wxMutex}}\label{wxmutex}
2
3 A wxMutex controls mutual exclusion, to prevent two or more threads accessing
4 the same piece of code.
5
6 \wxheading{Derived from}
7
8 None.
9
10 \wxheading{See also}
11
12 \helpref{wxThread}{wxthread}, \helpref{wxCondition}{wxcondition}
13
14 \latexignore{\rtfignore{\wxheading{Members}}}
15
16 \membersection{wxMutex::wxMutex}\label{wxmutexconstr}
17
18 \func{}{wxMutex}{\void}
19
20 Default constructor.
21
22 \membersection{wxMutex::\destruct{wxMutex}}
23
24 \func{}{\destruct{wxMutex}}{\void}
25
26 Destroys the wxMutex object.
27
28 \membersection{wxMutex::IsLocked}\label{wxmutexislocked}
29
30 \constfunc{bool}{IsLocked}{\void}
31
32 Returns TRUE if the mutex is locked, FALSE otherwise.
33
34 \membersection{wxMutex::Lock}\label{wxmutexlock}
35
36 \func{wxMutexError}{Lock}{\void}
37
38 Locks the mutex object.
39
40 \wxheading{Return value}
41
42 One of:
43
44 \twocolwidtha{7cm}
45 \begin{twocollist}\itemsep=0pt
46 \twocolitem{{\bf MUTEX\_NO\_ERROR}}{There was no error.}
47 \twocolitem{{\bf MUTEX\_DEAD\_LOCK}}{A deadlock situation was detected.}
48 \twocolitem{{\bf MUTEX\_BUSY}}{The mutex is already locked by another thread.}
49 \end{twocollist}
50
51 \membersection{wxMutex::TryLock}\label{wxmutextrylock}
52
53 \func{wxMutexError}{TryLock}{\void}
54
55 Tries to lock the mutex object. If it can't, returns immediately with an error.
56
57 \wxheading{Return value}
58
59 One of:
60
61 \twocolwidtha{7cm}
62 \begin{twocollist}\itemsep=0pt
63 \twocolitem{{\bf MUTEX\_NO\_ERROR}}{There was no error.}
64 \twocolitem{{\bf MUTEX\_DEAD\_LOCK}}{A deadlock situation was detected.}
65 \twocolitem{{\bf MUTEX\_BUSY}}{The mutex is already locked by another thread.}
66 \end{twocollist}
67
68 \membersection{wxMutex::Unlock}\label{wxmutexunlock}
69
70 \func{wxMutexError}{Unlock}{\void}
71
72 Unlocks the mutex object.
73
74 \wxheading{Return value}
75
76 One of:
77
78 \twocolwidtha{7cm}
79 \begin{twocollist}\itemsep=0pt
80 \twocolitem{{\bf MUTEX\_NO\_ERROR}}{There was no error.}
81 \twocolitem{{\bf MUTEX\_DEAD\_LOCK}}{A deadlock situation was detected.}
82 \twocolitem{{\bf MUTEX\_BUSY}}{The mutex is already locked by another thread.}
83 \twocolitem{{\bf MUTEX\_UNLOCKED}}{The calling thread tries to unlock an unlocked mutex.}
84 \end{twocollist}
85
86