90 <b>DebugClientThreads</b>(<i></i>) |
90 <b>DebugClientThreads</b>(<i></i>) |
91 <p> |
91 <p> |
92 Constructor |
92 Constructor |
93 </p><a NAME="DebugClientThreads.attachThread" ID="DebugClientThreads.attachThread"></a> |
93 </p><a NAME="DebugClientThreads.attachThread" ID="DebugClientThreads.attachThread"></a> |
94 <h4>DebugClientThreads.attachThread</h4> |
94 <h4>DebugClientThreads.attachThread</h4> |
95 <b>attachThread</b>(<i>target = None, args = None, kwargs = None, mainThread = False</i>) |
95 <b>attachThread</b>(<i>target=None, args=None, kwargs=None, mainThread=False</i>) |
96 <p> |
96 <p> |
97 Public method to setup a thread for DebugClient to debug. |
97 Public method to setup a thread for DebugClient to debug. |
98 </p><p> |
98 </p><p> |
99 If mainThread is non-zero, then we are attaching to the already |
99 If mainThread is non-zero, then we are attaching to the already |
100 started mainthread of the app and the rest of the args are ignored. |
100 started mainthread of the app and the rest of the args are ignored. |
101 </p><dl> |
101 </p><dl> |
102 <dt><i>target</i></dt> |
102 <dt><i>target</i></dt> |
103 <dd> |
103 <dd> |
104 the start function of the target thread (i.e. the user code) |
104 the start function of the target thread (i.e. the user code) |
118 <dd> |
118 <dd> |
119 identifier of the created thread |
119 identifier of the created thread |
120 </dd> |
120 </dd> |
121 </dl><a NAME="DebugClientThreads.eventLoop" ID="DebugClientThreads.eventLoop"></a> |
121 </dl><a NAME="DebugClientThreads.eventLoop" ID="DebugClientThreads.eventLoop"></a> |
122 <h4>DebugClientThreads.eventLoop</h4> |
122 <h4>DebugClientThreads.eventLoop</h4> |
123 <b>eventLoop</b>(<i>disablePolling = False</i>) |
123 <b>eventLoop</b>(<i>disablePolling=False</i>) |
124 <p> |
124 <p> |
125 Public method implementing our event loop. |
125 Public method implementing our event loop. |
126 </p><dl> |
126 </p><dl> |
127 <dt><i>disablePolling</i></dt> |
127 <dt><i>disablePolling</i></dt> |
128 <dd> |
128 <dd> |
129 flag indicating to enter an event loop with |
129 flag indicating to enter an event loop with |
130 polling disabled (boolean) |
130 polling disabled (boolean) |
131 </dd> |
131 </dd> |
132 </dl><a NAME="DebugClientThreads.lockClient" ID="DebugClientThreads.lockClient"></a> |
132 </dl><a NAME="DebugClientThreads.lockClient" ID="DebugClientThreads.lockClient"></a> |
133 <h4>DebugClientThreads.lockClient</h4> |
133 <h4>DebugClientThreads.lockClient</h4> |
134 <b>lockClient</b>(<i>blocking = True</i>) |
134 <b>lockClient</b>(<i>blocking=True</i>) |
135 <p> |
135 <p> |
136 Public method to acquire the lock for this client. |
136 Public method to acquire the lock for this client. |
137 </p><dl> |
137 </p><dl> |
138 <dt><i>blocking</i></dt> |
138 <dt><i>blocking</i></dt> |
139 <dd> |
139 <dd> |
177 </p> |
177 </p> |
178 <div align="right"><a href="#top">Up</a></div> |
178 <div align="right"><a href="#top">Up</a></div> |
179 <hr /><hr /> |
179 <hr /><hr /> |
180 <a NAME="_debugclient_start_new_thread" ID="_debugclient_start_new_thread"></a> |
180 <a NAME="_debugclient_start_new_thread" ID="_debugclient_start_new_thread"></a> |
181 <h2>_debugclient_start_new_thread</h2> |
181 <h2>_debugclient_start_new_thread</h2> |
182 <b>_debugclient_start_new_thread</b>(<i>target, args, kwargs = {}</i>) |
182 <b>_debugclient_start_new_thread</b>(<i>target, args, kwargs={}</i>) |
183 <p> |
183 <p> |
184 Module function used to allow for debugging of multiple threads. |
184 Module function used to allow for debugging of multiple threads. |
185 </p><p> |
185 </p><p> |
186 The way it works is that below, we reset _thread._start_new_thread to |
186 The way it works is that below, we reset _thread._start_new_thread to |
187 this function object. Thus, providing a hook for us to see when |
187 this function object. Thus, providing a hook for us to see when |
188 threads are started. From here we forward the request onto the |
188 threads are started. From here we forward the request onto the |
189 DebugClient which will create a DebugThread object to allow tracing |
189 DebugClient which will create a DebugThread object to allow tracing |
190 of the thread then start up the thread. These actions are always |
190 of the thread then start up the thread. These actions are always |
191 performed in order to allow dropping into debug mode. |
191 performed in order to allow dropping into debug mode. |
192 </p><p> |
192 </p><p> |
193 See DebugClientThreads.attachThread and DebugThread.DebugThread in |
193 See DebugClientThreads.attachThread and DebugThread.DebugThread in |
194 DebugThread.py |
194 DebugThread.py |
195 </p><dl> |
195 </p><dl> |
196 <dt><i>target</i></dt> |
196 <dt><i>target</i></dt> |
197 <dd> |
197 <dd> |
198 the start function of the target thread (i.e. the user code) |
198 the start function of the target thread (i.e. the user code) |