4
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
<title>GAsyncInitable</title>
5
<title>GIO Reference Manual: GAsyncInitable</title>
6
6
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
7
7
<link rel="home" href="index.html" title="GIO Reference Manual">
8
8
<link rel="up" href="failable_initialization.html" title="Failable Initialization">
12
12
<link rel="stylesheet" href="style.css" type="text/css">
14
14
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
17
<td><a accesskey="p" href="GInitable.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18
<td><a accesskey="u" href="failable_initialization.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20
<th width="100%" align="center">GIO Reference Manual</th>
21
<td><a accesskey="n" href="networking.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
23
<tr><td colspan="5" class="shortcuts">
24
<a href="#GAsyncInitable.synopsis" class="shortcut">Top</a>
15
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="10"><tr valign="middle">
16
<td width="100%" align="left">
17
<a href="#" class="shortcut">Top</a>
26
19
<a href="#GAsyncInitable.description" class="shortcut">Description</a>
30
23
<a href="#GAsyncInitable.prerequisites" class="shortcut">Prerequisites</a>
32
25
<a href="#GAsyncInitable.implementations" class="shortcut">Known Implementations</a>
27
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
28
<td><a accesskey="u" href="failable_initialization.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
29
<td><a accesskey="p" href="GInitable.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
30
<td><a accesskey="n" href="networking.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
35
32
<div class="refentry">
36
33
<a name="GAsyncInitable"></a><div class="titlepage"></div>
37
34
<div class="refnamediv"><table width="100%"><tr>
409
406
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
410
407
<td>the data to pass to callback function</td>
413
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
414
<td>with an error, then all operations on the object except
415
<a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-ref"><code class="function">g_object_ref()</code></a> and <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a> are considered to be invalid, and
416
have undefined behaviour. They will often fail with <a href="http://library.gnome.org/devel/glib/unstable/glib-Message-Logging.html#g-critical"><code class="function">g_critical()</code></a> or
417
<a href="http://library.gnome.org/devel/glib/unstable/glib-Message-Logging.html#g-warning"><code class="function">g_warning()</code></a>, but this must not be relied on.
418
Implementations of this method must be idempotent: i.e. multiple calls
419
to this function with the same argument should return the same results.
420
Only the first call initializes the object; further calls return the result
421
of the first call. This is so that it's safe to implement the singleton
422
pattern in the GObject constructor function.
423
For classes that also support the <a class="link" href="GInitable.html" title="GInitable"><span class="type">GInitable</span></a> interface, the default
424
implementation of this method will run the <a class="link" href="GInitable.html#g-initable-init" title="g_initable_init ()"><code class="function">g_initable_init()</code></a> function
425
in a thread, so if you want to support asynchronous initialization via
426
threads, just implement the <a class="link" href="GAsyncInitable.html" title="GAsyncInitable"><span class="type">GAsyncInitable</span></a> interface without overriding
427
any interface methods.</td>
431
411
<p class="since">Since 2.22</p>