|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.EricUtilities.EricMutexLocker</title> |
|
4 <meta charset="UTF-8"> |
|
5 <link rel="stylesheet" href="styles.css"> |
|
6 </head> |
|
7 <body> |
|
8 <a NAME="top" ID="top"></a> |
|
9 <h1>eric7.EricUtilities.EricMutexLocker</h1> |
|
10 |
|
11 <p> |
|
12 Module implementing a context manager locking and unlocking a mutex. |
|
13 </p> |
|
14 <h3>Global Attributes</h3> |
|
15 |
|
16 <table> |
|
17 <tr><td>None</td></tr> |
|
18 </table> |
|
19 <h3>Classes</h3> |
|
20 |
|
21 <table> |
|
22 |
|
23 <tr> |
|
24 <td><a href="#EricMutexLocker">EricMutexLocker</a></td> |
|
25 <td>Class implementing a context manager locking and unlocking a mutex.</td> |
|
26 </tr> |
|
27 </table> |
|
28 <h3>Functions</h3> |
|
29 |
|
30 <table> |
|
31 <tr><td>None</td></tr> |
|
32 </table> |
|
33 <hr /> |
|
34 <hr /> |
|
35 <a NAME="EricMutexLocker" ID="EricMutexLocker"></a> |
|
36 <h2>EricMutexLocker</h2> |
|
37 |
|
38 <p> |
|
39 Class implementing a context manager locking and unlocking a mutex. |
|
40 </p> |
|
41 <h3>Derived from</h3> |
|
42 contextlib.AbstractContextManager |
|
43 <h3>Class Attributes</h3> |
|
44 |
|
45 <table> |
|
46 <tr><td>None</td></tr> |
|
47 </table> |
|
48 <h3>Class Methods</h3> |
|
49 |
|
50 <table> |
|
51 <tr><td>None</td></tr> |
|
52 </table> |
|
53 <h3>Methods</h3> |
|
54 |
|
55 <table> |
|
56 |
|
57 <tr> |
|
58 <td><a href="#EricMutexLocker.__init__">EricMutexLocker</a></td> |
|
59 <td>Constructor</td> |
|
60 </tr> |
|
61 <tr> |
|
62 <td><a href="#EricMutexLocker.__enter__">__enter__</a></td> |
|
63 <td>Special method called when entering the runtime ccontext.</td> |
|
64 </tr> |
|
65 <tr> |
|
66 <td><a href="#EricMutexLocker.__exit__">__exit__</a></td> |
|
67 <td>Special method called when exiting the runtime ccontext.</td> |
|
68 </tr> |
|
69 </table> |
|
70 <h3>Static Methods</h3> |
|
71 |
|
72 <table> |
|
73 <tr><td>None</td></tr> |
|
74 </table> |
|
75 |
|
76 <a NAME="EricMutexLocker.__init__" ID="EricMutexLocker.__init__"></a> |
|
77 <h4>EricMutexLocker (Constructor)</h4> |
|
78 <b>EricMutexLocker</b>(<i>mutex</i>) |
|
79 |
|
80 <p> |
|
81 Constructor |
|
82 </p> |
|
83 <dl> |
|
84 |
|
85 <dt><i>mutex</i> (QMutex or QRecursiveMutex)</dt> |
|
86 <dd> |
|
87 reference to the mutex to be locked |
|
88 </dd> |
|
89 </dl> |
|
90 <a NAME="EricMutexLocker.__enter__" ID="EricMutexLocker.__enter__"></a> |
|
91 <h4>EricMutexLocker.__enter__</h4> |
|
92 <b>__enter__</b>(<i></i>) |
|
93 |
|
94 <p> |
|
95 Special method called when entering the runtime ccontext. |
|
96 </p> |
|
97 <dl> |
|
98 <dt>Return:</dt> |
|
99 <dd> |
|
100 reference to the context manager object |
|
101 </dd> |
|
102 </dl> |
|
103 <dl> |
|
104 <dt>Return Type:</dt> |
|
105 <dd> |
|
106 EricOverrideCursor |
|
107 </dd> |
|
108 </dl> |
|
109 <a NAME="EricMutexLocker.__exit__" ID="EricMutexLocker.__exit__"></a> |
|
110 <h4>EricMutexLocker.__exit__</h4> |
|
111 <b>__exit__</b>(<i>exc_type, exc_value, traceback</i>) |
|
112 |
|
113 <p> |
|
114 Special method called when exiting the runtime ccontext. |
|
115 </p> |
|
116 <dl> |
|
117 |
|
118 <dt><i>exc_type</i></dt> |
|
119 <dd> |
|
120 type of an exception raised in the runtime context |
|
121 </dd> |
|
122 <dt><i>exc_value</i></dt> |
|
123 <dd> |
|
124 value of an exception raised in the runtime context |
|
125 </dd> |
|
126 <dt><i>traceback</i></dt> |
|
127 <dd> |
|
128 traceback of an exception raised in the runtime |
|
129 context |
|
130 </dd> |
|
131 </dl> |
|
132 <dl> |
|
133 <dt>Return:</dt> |
|
134 <dd> |
|
135 always returns None to not suppress any exception |
|
136 </dd> |
|
137 </dl> |
|
138 <dl> |
|
139 <dt>Return Type:</dt> |
|
140 <dd> |
|
141 None |
|
142 </dd> |
|
143 </dl> |
|
144 <div align="right"><a href="#top">Up</a></div> |
|
145 <hr /> |
|
146 </body></html> |