This file is indexed.

/usr/share/gtk-doc/html/libgda-4.0/GdaThreadWrapper.html is in libgda-4.0-doc 4.2.8-2build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GdaThreadWrapper</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="index.html" title="GNOME Data Access 4 manual">
<link rel="up" href="multi-threading.html" title="Multi threading">
<link rel="prev" href="GdaLockable.html" title="GdaLockable">
<link rel="next" href="misc.html" title="Miscellaneous">
<meta name="generator" content="GTK-Doc V1.17 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="GdaLockable.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="multi-threading.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GNOME Data Access 4 manual</th>
<td><a accesskey="n" href="misc.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#GdaThreadWrapper.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#GdaThreadWrapper.description" class="shortcut">Description</a>
                   | 
                  <a href="#GdaThreadWrapper.object-hierarchy" class="shortcut">Object Hierarchy</a>
</td></tr>
</table>
<div class="refentry">
<a name="GdaThreadWrapper"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GdaThreadWrapper.top_of_page"></a>GdaThreadWrapper</span></h2>
<p>GdaThreadWrapper — Execute functions in a sub thread</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="GdaThreadWrapper.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;libgda/thread-wrapper/gda-thread-wrapper.h&gt;

struct              <a class="link" href="GdaThreadWrapper.html#GdaThreadWrapper-struct" title="struct GdaThreadWrapper">GdaThreadWrapper</a>;
<a class="link" href="GdaThreadWrapper.html" title="GdaThreadWrapper"><span class="returnvalue">GdaThreadWrapper</span></a> *  <a class="link" href="GdaThreadWrapper.html#gda-thread-wrapper-new" title="gda_thread_wrapper_new ()">gda_thread_wrapper_new</a>              (<em class="parameter"><code><span class="type">void</span></code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>            (<a class="link" href="GdaThreadWrapper.html#GdaThreadWrapperFunc" title="GdaThreadWrapperFunc ()">*GdaThreadWrapperFunc</a>)             (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> arg</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>               <a class="link" href="GdaThreadWrapper.html#gda-thread-wrapper-execute" title="gda_thread_wrapper_execute ()">gda_thread_wrapper_execute</a>          (<em class="parameter"><code><a class="link" href="GdaThreadWrapper.html" title="GdaThreadWrapper"><span class="type">GdaThreadWrapper</span></a> *wrapper</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GdaThreadWrapper.html#GdaThreadWrapperFunc" title="GdaThreadWrapperFunc ()"><span class="type">GdaThreadWrapperFunc</span></a> func</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> arg</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> arg_destroy_func</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<span class="returnvalue">void</span>                (<a class="link" href="GdaThreadWrapper.html#GdaThreadWrapperVoidFunc" title="GdaThreadWrapperVoidFunc ()">*GdaThreadWrapperVoidFunc</a>)         (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> arg</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>               <a class="link" href="GdaThreadWrapper.html#gda-thread-wrapper-execute-void" title="gda_thread_wrapper_execute_void ()">gda_thread_wrapper_execute_void</a>     (<em class="parameter"><code><a class="link" href="GdaThreadWrapper.html" title="GdaThreadWrapper"><span class="type">GdaThreadWrapper</span></a> *wrapper</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GdaThreadWrapper.html#GdaThreadWrapperVoidFunc" title="GdaThreadWrapperVoidFunc ()"><span class="type">GdaThreadWrapperVoidFunc</span></a> func</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> arg</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> arg_destroy_func</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="GdaThreadWrapper.html#gda-thread-wrapper-cancel" title="gda_thread_wrapper_cancel ()">gda_thread_wrapper_cancel</a>           (<em class="parameter"><code><a class="link" href="GdaThreadWrapper.html" title="GdaThreadWrapper"><span class="type">GdaThreadWrapper</span></a> *wrapper</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> id</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="GdaThreadWrapper.html#gda-thread-wrapper-iterate" title="gda_thread_wrapper_iterate ()">gda_thread_wrapper_iterate</a>          (<em class="parameter"><code><a class="link" href="GdaThreadWrapper.html" title="GdaThreadWrapper"><span class="type">GdaThreadWrapper</span></a> *wrapper</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> may_block</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>            <a class="link" href="GdaThreadWrapper.html#gda-thread-wrapper-fetch-result" title="gda_thread_wrapper_fetch_result ()">gda_thread_wrapper_fetch_result</a>     (<em class="parameter"><code><a class="link" href="GdaThreadWrapper.html" title="GdaThreadWrapper"><span class="type">GdaThreadWrapper</span></a> *wrapper</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> may_lock</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> exp_id</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                <a class="link" href="GdaThreadWrapper.html#gda-thread-wrapper-get-waiting-size" title="gda_thread_wrapper_get_waiting_size ()">gda_thread_wrapper_get_waiting_size</a> (<em class="parameter"><code><a class="link" href="GdaThreadWrapper.html" title="GdaThreadWrapper"><span class="type">GdaThreadWrapper</span></a> *wrapper</code></em>);
<span class="returnvalue">void</span>                (<a class="link" href="GdaThreadWrapper.html#GdaThreadWrapperCallback" title="GdaThreadWrapperCallback ()">*GdaThreadWrapperCallback</a>)         (<em class="parameter"><code><a class="link" href="GdaThreadWrapper.html" title="GdaThreadWrapper"><span class="type">GdaThreadWrapper</span></a> *wrapper</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> instance</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *signame</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n_param_values</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> *param_values</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> gda_reserved</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gulong"><span class="returnvalue">gulong</span></a>              <a class="link" href="GdaThreadWrapper.html#gda-thread-wrapper-connect-raw" title="gda_thread_wrapper_connect_raw ()">gda_thread_wrapper_connect_raw</a>      (<em class="parameter"><code><a class="link" href="GdaThreadWrapper.html" title="GdaThreadWrapper"><span class="type">GdaThreadWrapper</span></a> *wrapper</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> instance</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *sig_name</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> private_thread</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> private_job</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GdaThreadWrapper.html#GdaThreadWrapperCallback" title="GdaThreadWrapperCallback ()"><span class="type">GdaThreadWrapperCallback</span></a> callback</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="GdaThreadWrapper.html#gda-thread-wrapper-disconnect" title="gda_thread_wrapper_disconnect ()">gda_thread_wrapper_disconnect</a>       (<em class="parameter"><code><a class="link" href="GdaThreadWrapper.html" title="GdaThreadWrapper"><span class="type">GdaThreadWrapper</span></a> *wrapper</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gulong"><span class="type">gulong</span></a> id</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="GdaThreadWrapper.html#gda-thread-wrapper-steal-signal" title="gda_thread_wrapper_steal_signal ()">gda_thread_wrapper_steal_signal</a>     (<em class="parameter"><code><a class="link" href="GdaThreadWrapper.html" title="GdaThreadWrapper"><span class="type">GdaThreadWrapper</span></a> *wrapper</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gulong"><span class="type">gulong</span></a> id</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="GdaThreadWrapper.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
  <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
   +----GdaThreadWrapper
</pre>
</div>
<div class="refsect1">
<a name="GdaThreadWrapper.description"></a><h2>Description</h2>
<p>
  The purpose of the <a class="link" href="GdaThreadWrapper.html" title="GdaThreadWrapper"><span class="type">GdaThreadWrapper</span></a> object is to execute functions in an isolated sub thread. As the
  <a class="link" href="GdaThreadWrapper.html" title="GdaThreadWrapper"><span class="type">GdaThreadWrapper</span></a> is thread safe, one is able to isolate some code's execution is a <span class="emphasis"><em>private</em></span>
  <span class="emphasis"><em>worker</em></span> thread, and make a non thread safe code thread safe.
</p>
<p>
  The downside of this is that the actual execution of the code will be slower as it requires
  threads to be synchronized.
</p>
<p>
  The <a class="link" href="GdaThreadWrapper.html" title="GdaThreadWrapper"><span class="type">GdaThreadWrapper</span></a> implements its own locking mechanism and can safely be used from multiple
  threads at once without needing further locking.
</p>
<p>
  Each thread using a <a class="link" href="GdaThreadWrapper.html" title="GdaThreadWrapper"><span class="type">GdaThreadWrapper</span></a> object can use it as if it was the only user: the <a class="link" href="GdaThreadWrapper.html" title="GdaThreadWrapper"><span class="type">GdaThreadWrapper</span></a> will
  simply dispatch all the execution requests to its private <span class="emphasis"><em>worker</em></span> thread and report the
  execution's status only to the thread which made the request.
</p>
<p>
  The user can also specify a callback function to be called when an object exmits a signal while being
  used by the worker thread, see the <a class="link" href="GdaThreadWrapper.html#gda-thread-wrapper-connect-raw" title="gda_thread_wrapper_connect_raw ()"><code class="function">gda_thread_wrapper_connect_raw()</code></a> method.
</p>
<p>
  The following diagram illustrates the conceptual working of the <a class="link" href="GdaThreadWrapper.html" title="GdaThreadWrapper"><span class="type">GdaThreadWrapper</span></a> object: here two user threads
  are represented (assigned a red and green colors), both using a single <a class="link" href="GdaThreadWrapper.html" title="GdaThreadWrapper"><span class="type">GdaThreadWrapper</span></a>, so in this diagram, 3 threads
  are present. The communication between the threads are handled by some <a href="http://library.gnome.org/devel/glib/unstable/glib-Asynchronous-Queues.html#GAsyncQueue"><span class="type">GAsyncQueue</span></a> objects (in a transparent way for
  the user, presented here only for illustration purposes). The queue represented in yellow is where jobs are
  pushed by each user thread (step 1), and popped by the worker thread (step 2). Once the user thread has finished
  with a job, it stores the result along with the job and pushes it to the queue dedicated to the user thread
  (step 3) in this example the red queue (because the job was issued from the thread represented in red). The last
  step is when the user fetches the result (in its user thread), step 4.
</p>
<p>
  If, when the worker thread is busy with a job, a signal is emitted, and if the user has set up a signal handler
  using <a class="link" href="GdaThreadWrapper.html#gda-thread-wrapper-connect-raw" title="gda_thread_wrapper_connect_raw ()"><code class="function">gda_thread_wrapper_connect_raw()</code></a>,
  then a "job as signal" is created by the worker thread and pushed to the user thread as illustrated
  at the bottom of the diagram.
  </p>
<div class="mediaobject"><img src="thread-wrapper.png" width="602.36220472441" alt="GdaThreadWrapper's conceptual working"></div>
<p>
</p>
</div>
<div class="refsect1">
<a name="GdaThreadWrapper.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="GdaThreadWrapper-struct"></a><h3>struct GdaThreadWrapper</h3>
<pre class="programlisting">struct GdaThreadWrapper;</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="gda-thread-wrapper-new"></a><h3>gda_thread_wrapper_new ()</h3>
<pre class="programlisting"><a class="link" href="GdaThreadWrapper.html" title="GdaThreadWrapper"><span class="returnvalue">GdaThreadWrapper</span></a> *  gda_thread_wrapper_new              (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Creates a new <a class="link" href="GdaThreadWrapper.html" title="GdaThreadWrapper"><span class="type">GdaThreadWrapper</span></a> object
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new <a class="link" href="GdaThreadWrapper.html" title="GdaThreadWrapper"><span class="type">GdaThreadWrapper</span></a> object, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if threads are not supported/enabled</td>
</tr></tbody>
</table></div>
<p class="since">Since 4.2</p>
</div>
<hr>
<div class="refsect2">
<a name="GdaThreadWrapperFunc"></a><h3>GdaThreadWrapperFunc ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>            (*GdaThreadWrapperFunc)             (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> arg</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
  Specifies the type of function to be passed to <a class="link" href="GdaThreadWrapper.html#gda-thread-wrapper-execute" title="gda_thread_wrapper_execute ()"><code class="function">gda_thread_wrapper_execute()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>arg</code></em> :</span></p></td>
<td>pointer to the data (which is the <em class="parameter"><code>arg</code></em> argument passed to <a class="link" href="GdaThreadWrapper.html#gda-thread-wrapper-execute-void" title="gda_thread_wrapper_execute_void ()"><code class="function">gda_thread_wrapper_execute_void()</code></a>)</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>a place to store errors</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a pointer to some data which will be returned by <a class="link" href="GdaThreadWrapper.html#gda-thread-wrapper-fetch-result" title="gda_thread_wrapper_fetch_result ()"><code class="function">gda_thread_wrapper_fetch_result()</code></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gda-thread-wrapper-execute"></a><h3>gda_thread_wrapper_execute ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>               gda_thread_wrapper_execute          (<em class="parameter"><code><a class="link" href="GdaThreadWrapper.html" title="GdaThreadWrapper"><span class="type">GdaThreadWrapper</span></a> *wrapper</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GdaThreadWrapper.html#GdaThreadWrapperFunc" title="GdaThreadWrapperFunc ()"><span class="type">GdaThreadWrapperFunc</span></a> func</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> arg</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> arg_destroy_func</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Make <em class="parameter"><code>wrapper</code></em> execute the <em class="parameter"><code>func</code></em> function with the <em class="parameter"><code>arg</code></em> argument (along with a <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> which is not <em class="parameter"><code>error</code></em>)
in the sub thread managed by <em class="parameter"><code>wrapper</code></em>. To execute a function which does not return anything,
use <a class="link" href="GdaThreadWrapper.html#gda-thread-wrapper-execute-void" title="gda_thread_wrapper_execute_void ()"><code class="function">gda_thread_wrapper_execute_void()</code></a>.
</p>
<p>
This method returns immediately, and the caller then needs to use <a class="link" href="GdaThreadWrapper.html#gda-thread-wrapper-fetch-result" title="gda_thread_wrapper_fetch_result ()"><code class="function">gda_thread_wrapper_fetch_result()</code></a> to
check if the execution has finished and get the result.
</p>
<p>
Once <em class="parameter"><code>func</code></em>'s execution is finished, if it is not <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, the <em class="parameter"><code>arg_destroy_func</code></em> destruction function is called
on <em class="parameter"><code>arg</code></em>. This occurs in the thread calling <a class="link" href="GdaThreadWrapper.html#gda-thread-wrapper-fetch-result" title="gda_thread_wrapper_fetch_result ()"><code class="function">gda_thread_wrapper_fetch_result()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>wrapper</code></em> :</span></p></td>
<td>a <a class="link" href="GdaThreadWrapper.html" title="GdaThreadWrapper"><span class="type">GdaThreadWrapper</span></a> object</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
<td>the function to execute</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>arg</code></em> :</span></p></td>
<td>argument to pass to <em class="parameter"><code>func</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>arg_destroy_func</code></em> :</span></p></td>
<td>function to be called when the execution has finished, to destroy <em class="parameter"><code>arg</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>a place to store errors, for errors occurring in this method, not errors occurring while <em class="parameter"><code>func</code></em>
is executed, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the job ID, or 0 if an error occurred</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 4.2</p>
</div>
<hr>
<div class="refsect2">
<a name="GdaThreadWrapperVoidFunc"></a><h3>GdaThreadWrapperVoidFunc ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                (*GdaThreadWrapperVoidFunc)         (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> arg</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
  Specifies the type of function to be passed to <a class="link" href="GdaThreadWrapper.html#gda-thread-wrapper-execute-void" title="gda_thread_wrapper_execute_void ()"><code class="function">gda_thread_wrapper_execute_void()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>arg</code></em> :</span></p></td>
<td>a pointer to the data (which is the <em class="parameter"><code>arg</code></em> argument passed to <a class="link" href="GdaThreadWrapper.html#gda-thread-wrapper-execute-void" title="gda_thread_wrapper_execute_void ()"><code class="function">gda_thread_wrapper_execute_void()</code></a>)</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>a place to store errors</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gda-thread-wrapper-execute-void"></a><h3>gda_thread_wrapper_execute_void ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>               gda_thread_wrapper_execute_void     (<em class="parameter"><code><a class="link" href="GdaThreadWrapper.html" title="GdaThreadWrapper"><span class="type">GdaThreadWrapper</span></a> *wrapper</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GdaThreadWrapper.html#GdaThreadWrapperVoidFunc" title="GdaThreadWrapperVoidFunc ()"><span class="type">GdaThreadWrapperVoidFunc</span></a> func</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> arg</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> arg_destroy_func</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Make <em class="parameter"><code>wrapper</code></em> execute the <em class="parameter"><code>func</code></em> function with the <em class="parameter"><code>arg</code></em> argument (along with a <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> which is not <em class="parameter"><code>error</code></em>)
in the sub thread managed by <em class="parameter"><code>wrapper</code></em>. To execute a function which returns some pointer,
use <a class="link" href="GdaThreadWrapper.html#gda-thread-wrapper-execute" title="gda_thread_wrapper_execute ()"><code class="function">gda_thread_wrapper_execute()</code></a>.
</p>
<p>
This method returns immediately. Calling <a class="link" href="GdaThreadWrapper.html#gda-thread-wrapper-fetch-result" title="gda_thread_wrapper_fetch_result ()"><code class="function">gda_thread_wrapper_fetch_result()</code></a> is not necessary as <em class="parameter"><code>func</code></em>
does not return any result. However, it may be necessary to call <a class="link" href="GdaThreadWrapper.html#gda-thread-wrapper-iterate" title="gda_thread_wrapper_iterate ()"><code class="function">gda_thread_wrapper_iterate()</code></a> to give <em class="parameter"><code>wrapper</code></em> a
chance to execute the <em class="parameter"><code>arg_destroy_func</code></em> function if not <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> (note that <a class="link" href="GdaThreadWrapper.html#gda-thread-wrapper-iterate" title="gda_thread_wrapper_iterate ()"><code class="function">gda_thread_wrapper_iterate()</code></a> is
called by <a class="link" href="GdaThreadWrapper.html#gda-thread-wrapper-fetch-result" title="gda_thread_wrapper_fetch_result ()"><code class="function">gda_thread_wrapper_fetch_result()</code></a> itself).
</p>
<p>
Once <em class="parameter"><code>func</code></em>'s execution is finished, if it is not <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, the <em class="parameter"><code>arg_destroy_func</code></em> destruction function is called
on <em class="parameter"><code>arg</code></em>. This occurs in the thread calling <a class="link" href="GdaThreadWrapper.html#gda-thread-wrapper-fetch-result" title="gda_thread_wrapper_fetch_result ()"><code class="function">gda_thread_wrapper_fetch_result()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>wrapper</code></em> :</span></p></td>
<td>a <a class="link" href="GdaThreadWrapper.html" title="GdaThreadWrapper"><span class="type">GdaThreadWrapper</span></a> object</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
<td>the function to execute</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>arg</code></em> :</span></p></td>
<td>argument to pass to <em class="parameter"><code>func</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>arg_destroy_func</code></em> :</span></p></td>
<td>function to be called when the execution has finished, to destroy <em class="parameter"><code>arg</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>a place to store errors, for errors occurring in this method, not errors occurring while <em class="parameter"><code>func</code></em>
is executed, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the job ID, or 0 if an error occurred</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 4.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gda-thread-wrapper-cancel"></a><h3>gda_thread_wrapper_cancel ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gda_thread_wrapper_cancel           (<em class="parameter"><code><a class="link" href="GdaThreadWrapper.html" title="GdaThreadWrapper"><span class="type">GdaThreadWrapper</span></a> *wrapper</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> id</code></em>);</pre>
<p>
Cancels a job not yet executed. This may fail for the following reasons:
</p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem"><p>the job <em class="parameter"><code>id</code></em> could not be found, either because it has already been treated or because
                 it does not exist or because it was created in another thread</p></li>
<li class="listitem"><p>the job <em class="parameter"><code>id</code></em> is currently being treated by the worker thread</p></li>
</ul></div>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>wrapper</code></em> :</span></p></td>
<td>a <a class="link" href="GdaThreadWrapper.html" title="GdaThreadWrapper"><span class="type">GdaThreadWrapper</span></a> object</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>id</code></em> :</span></p></td>
<td>the ID of a job as returned by <a class="link" href="GdaThreadWrapper.html#gda-thread-wrapper-execute" title="gda_thread_wrapper_execute ()"><code class="function">gda_thread_wrapper_execute()</code></a> or <a class="link" href="GdaThreadWrapper.html#gda-thread-wrapper-execute-void" title="gda_thread_wrapper_execute_void ()"><code class="function">gda_thread_wrapper_execute_void()</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the job has been cancelled, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> in any other case.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 4.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gda-thread-wrapper-iterate"></a><h3>gda_thread_wrapper_iterate ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gda_thread_wrapper_iterate          (<em class="parameter"><code><a class="link" href="GdaThreadWrapper.html" title="GdaThreadWrapper"><span class="type">GdaThreadWrapper</span></a> *wrapper</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> may_block</code></em>);</pre>
<p>
This method gives <em class="parameter"><code>wrapper</code></em> a chance to check if some functions to be executed have finished
<span class="emphasis"><em>for the calling thread</em></span>. It handles one function's execution result, and
if <em class="parameter"><code>may_block</code></em> is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, then it will block untill there is one (functions returning void are
ignored).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>wrapper</code></em> :</span></p></td>
<td>a <a class="link" href="GdaThreadWrapper.html" title="GdaThreadWrapper"><span class="type">GdaThreadWrapper</span></a> object</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>may_block</code></em> :</span></p></td>
<td>whether the call may block</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 4.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gda-thread-wrapper-fetch-result"></a><h3>gda_thread_wrapper_fetch_result ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>            gda_thread_wrapper_fetch_result     (<em class="parameter"><code><a class="link" href="GdaThreadWrapper.html" title="GdaThreadWrapper"><span class="type">GdaThreadWrapper</span></a> *wrapper</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> may_lock</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> exp_id</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Use this method to check if the execution of a function is finished. The function's execution must have
been requested using <a class="link" href="GdaThreadWrapper.html#gda-thread-wrapper-execute" title="gda_thread_wrapper_execute ()"><code class="function">gda_thread_wrapper_execute()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>wrapper</code></em> :</span></p></td>
<td>a <a class="link" href="GdaThreadWrapper.html" title="GdaThreadWrapper"><span class="type">GdaThreadWrapper</span></a> object</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>may_lock</code></em> :</span></p></td>
<td>TRUE if this funct must lock the caller untill a result is available</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>exp_id</code></em> :</span></p></td>
<td>ID of the job for which a result is expected</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>a place to store errors, for errors which may have occurred during the execution, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the pointer returned by the execution, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if no result is available. <span class="annotation">[<a href="http://foldoc.org/transfer%20none"><span class="acronym">transfer none</span></a>][<a href="http://foldoc.org/allow-none"><span class="acronym">allow-none</span></a>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 4.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gda-thread-wrapper-get-waiting-size"></a><h3>gda_thread_wrapper_get_waiting_size ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                gda_thread_wrapper_get_waiting_size (<em class="parameter"><code><a class="link" href="GdaThreadWrapper.html" title="GdaThreadWrapper"><span class="type">GdaThreadWrapper</span></a> *wrapper</code></em>);</pre>
<p>
Use this method to query the number of functions which have been queued to be executed
but which have not yet been executed.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>wrapper</code></em> :</span></p></td>
<td>a <a class="link" href="GdaThreadWrapper.html" title="GdaThreadWrapper"><span class="type">GdaThreadWrapper</span></a> object</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the number of jobs not yet executed</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 4.2</p>
</div>
<hr>
<div class="refsect2">
<a name="GdaThreadWrapperCallback"></a><h3>GdaThreadWrapperCallback ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                (*GdaThreadWrapperCallback)         (<em class="parameter"><code><a class="link" href="GdaThreadWrapper.html" title="GdaThreadWrapper"><span class="type">GdaThreadWrapper</span></a> *wrapper</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> instance</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *signame</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n_param_values</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> *param_values</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> gda_reserved</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
<p>
  Specifies the type of function to be passed to <a class="link" href="GdaThreadWrapper.html#gda-thread-wrapper-connect-raw" title="gda_thread_wrapper_connect_raw ()"><code class="function">gda_thread_wrapper_connect_raw()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>wrapper</code></em> :</span></p></td>
<td>the <a class="link" href="GdaThreadWrapper.html" title="GdaThreadWrapper"><span class="type">GdaThreadWrapper</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>instance</code></em> :</span></p></td>
<td>a pointer to the instance which emitted the signal</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>signame</code></em> :</span></p></td>
<td>the name of the signal being emitted</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n_param_values</code></em> :</span></p></td>
<td>number of GValue in <em class="parameter"><code>param_values</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>param_values</code></em> :</span></p></td>
<td>array of <em class="parameter"><code>n_param_values</code></em> GValue</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>gda_reserved</code></em> :</span></p></td>
<td>reserved</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>a pointer to the data (which is the <em class="parameter"><code>data</code></em> argument passed to <a class="link" href="GdaThreadWrapper.html#gda-thread-wrapper-connect-raw" title="gda_thread_wrapper_connect_raw ()"><code class="function">gda_thread_wrapper_connect_raw()</code></a>)</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gda-thread-wrapper-connect-raw"></a><h3>gda_thread_wrapper_connect_raw ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gulong"><span class="returnvalue">gulong</span></a>              gda_thread_wrapper_connect_raw      (<em class="parameter"><code><a class="link" href="GdaThreadWrapper.html" title="GdaThreadWrapper"><span class="type">GdaThreadWrapper</span></a> *wrapper</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> instance</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *sig_name</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> private_thread</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> private_job</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GdaThreadWrapper.html#GdaThreadWrapperCallback" title="GdaThreadWrapperCallback ()"><span class="type">GdaThreadWrapperCallback</span></a> callback</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
<p>
Connects a callback function to a signal for a particular object. The difference with <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#g-signal-connect"><code class="function">g_signal_connect()</code></a> and
similar functions are:
</p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem"><p>the <em class="parameter"><code>callback</code></em> argument is not a <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Closures.html#GCallback"><span class="type">GCallback</span></a> function, so the callback signature is not
   dependent on the signal itself</p></li>
<li class="listitem"><p>the signal handler must not have to return any value</p></li>
<li class="listitem"><p>the <em class="parameter"><code>callback</code></em> function will be called asynchronously, the caller may need to use 
   <a class="link" href="GdaThreadWrapper.html#gda-thread-wrapper-iterate" title="gda_thread_wrapper_iterate ()"><code class="function">gda_thread_wrapper_iterate()</code></a> to get the notification</p></li>
<li class="listitem"><p>if <em class="parameter"><code>private_job</code></em> and <em class="parameter"><code>private_thread</code></em> control in which case the signal is propagated.</p></li>
</ul></div>
<p>
</p>
<p>
Also note that signal handling is done asynchronously: when emitted in the worker thread, it
will be "queued" to be processed in the user thread when it has the chance (when <code class="function">gda_thread_wrapper()</code>
is called directly or indirectly). The side effect is that the callback function is usually
called long after the object emitting the signal has finished emitting it.
</p>
<p>
To disconnect a signal handler, don't use any of the g_signal_handler_*() functions but the
<a class="link" href="GdaThreadWrapper.html#gda-thread-wrapper-disconnect" title="gda_thread_wrapper_disconnect ()"><code class="function">gda_thread_wrapper_disconnect()</code></a> method.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>wrapper</code></em> :</span></p></td>
<td>a <a class="link" href="GdaThreadWrapper.html" title="GdaThreadWrapper"><span class="type">GdaThreadWrapper</span></a> object</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>instance</code></em> :</span></p></td>
<td>the instance to connect to</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>sig_name</code></em> :</span></p></td>
<td>a string of the form "signal-name::detail"</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>private_thread</code></em> :</span></p></td>
<td>set to <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>callback</code></em> is to be invoked only if the signal has
been emitted while in <em class="parameter"><code>wrapper</code></em>'s private sub thread (ie. used when <em class="parameter"><code>wrapper</code></em> is executing some functions
specified by <a class="link" href="GdaThreadWrapper.html#gda-thread-wrapper-execute" title="gda_thread_wrapper_execute ()"><code class="function">gda_thread_wrapper_execute()</code></a> or <a class="link" href="GdaThreadWrapper.html#gda-thread-wrapper-execute-void" title="gda_thread_wrapper_execute_void ()"><code class="function">gda_thread_wrapper_execute_void()</code></a>), and to <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if the
callback is to be invoked whenever the signal is emitted, independently of the thread in which the
signal is emitted.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>private_job</code></em> :</span></p></td>
<td>set to <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>callback</code></em> is to be invoked only if the signal has
been emitted when a job created for the calling thread is being executed, and to <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>
if <em class="parameter"><code>callback</code></em> has to be called whenever the <em class="parameter"><code>sig_name</code></em> signal is emitted by <em class="parameter"><code>instance</code></em>. Note that
this argument is not taken into account if <em class="parameter"><code>private_thread</code></em> is set to <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
<td>a <a class="link" href="GdaThreadWrapper.html#GdaThreadWrapperCallback" title="GdaThreadWrapperCallback ()"><span class="type">GdaThreadWrapperCallback</span></a> function. <span class="annotation">[<a href="http://foldoc.org/scope%20call"><span class="acronym">scope call</span></a>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>data to pass to <em class="parameter"><code>callback</code></em>'s calls. <span class="annotation">[<a href="http://foldoc.org/closure"><span class="acronym">closure</span></a>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the handler ID</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 4.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gda-thread-wrapper-disconnect"></a><h3>gda_thread_wrapper_disconnect ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gda_thread_wrapper_disconnect       (<em class="parameter"><code><a class="link" href="GdaThreadWrapper.html" title="GdaThreadWrapper"><span class="type">GdaThreadWrapper</span></a> *wrapper</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gulong"><span class="type">gulong</span></a> id</code></em>);</pre>
<p>
Disconnects the emission of a signal, does the opposite of <a class="link" href="GdaThreadWrapper.html#gda-thread-wrapper-connect-raw" title="gda_thread_wrapper_connect_raw ()"><code class="function">gda_thread_wrapper_connect_raw()</code></a>.
</p>
<p>
As soon as this method returns, the callback function set when <a class="link" href="GdaThreadWrapper.html#gda-thread-wrapper-connect-raw" title="gda_thread_wrapper_connect_raw ()"><code class="function">gda_thread_wrapper_connect_raw()</code></a>
was called will not be called anymore (even if the object has emitted the signal in the worker
thread and this signal has not been handled in the user thread).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>wrapper</code></em> :</span></p></td>
<td>a <a class="link" href="GdaThreadWrapper.html" title="GdaThreadWrapper"><span class="type">GdaThreadWrapper</span></a> object</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>id</code></em> :</span></p></td>
<td>a handler ID, as returned by <a class="link" href="GdaThreadWrapper.html#gda-thread-wrapper-connect-raw" title="gda_thread_wrapper_connect_raw ()"><code class="function">gda_thread_wrapper_connect_raw()</code></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 4.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gda-thread-wrapper-steal-signal"></a><h3>gda_thread_wrapper_steal_signal ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gda_thread_wrapper_steal_signal     (<em class="parameter"><code><a class="link" href="GdaThreadWrapper.html" title="GdaThreadWrapper"><span class="type">GdaThreadWrapper</span></a> *wrapper</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gulong"><span class="type">gulong</span></a> id</code></em>);</pre>
<p>
Requests that the signal which ID is <em class="parameter"><code>id</code></em> (which has been obtained using <a class="link" href="GdaThreadWrapper.html#gda-thread-wrapper-connect-raw" title="gda_thread_wrapper_connect_raw ()"><code class="function">gda_thread_wrapper_connect_raw()</code></a>)
be treated by the calling thread instead of by the thread in which <a class="link" href="GdaThreadWrapper.html#gda-thread-wrapper-connect-raw" title="gda_thread_wrapper_connect_raw ()"><code class="function">gda_thread_wrapper_connect_raw()</code></a>
was called.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>wrapper</code></em> :</span></p></td>
<td>a <a class="link" href="GdaThreadWrapper.html" title="GdaThreadWrapper"><span class="type">GdaThreadWrapper</span></a> object</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>id</code></em> :</span></p></td>
<td>a signal ID</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 4.2</p>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.17</div>
</body>
</html>