* The callback for an asynchronous operation is called only once, and is
* always called, even in the case of a cancelled operation. On cancellation
* the result is a %G_IO_ERROR_CANCELLED error.
- *
- * Some asynchronous operations are implemented using synchronous calls.
- * These are run in a separate thread, if #GThread has been initialized, but
- * otherwise they are sent to the Main Event Loop and processed in an idle
- * function. So, if you truly need asynchronous operations, make sure to
- * initialize #GThread.
**/
typedef GAsyncResultIface GAsyncResultInterface;
* of the request.
* @cancellable: optional #GCancellable object, %NULL to ignore.
*
- * Schedules the I/O job to run.
+ * Schedules the I/O job to run in another thread.
*
* @notify will be called on @user_data after @job_func has returned,
* regardless whether the job was cancelled or has run to completion.
/**
* GThreadedSocketService:
*
- * A helper class for handling accepting incomming connections in the
+ * A helper class for handling accepting incoming connections in the
* glib mainloop and handling them in a thread.
*
* Since: 2.22
*
* I/O Job function.
*
- * Note that depending on whether threads are available, the
- * #GIOScheduler may run jobs in separate threads or in an idle
- * in the mainloop.
- *
* Long-running jobs should periodically check the @cancellable
* to see if they have been cancelled.
*
*
* Gets the default #GResolver. You should unref it when you are done
* with it. #GResolver may use its reference count as a hint about how
- * many threads/processes, etc it should allocate for concurrent DNS
- * resolutions.
+ * many threads it should allocate for concurrent DNS resolutions.
*
* Return value: (transfer full): the default #GResolver.
*
* cause a leak if cancelled before being run).
*
* GSimpleAsyncResult can integrate into GLib's event loop, #GMainLoop,
- * or it can use #GThread<!-- -->s if available.
+ * or it can use #GThread<!-- -->s.
* g_simple_async_result_complete() will finish an I/O task directly
* from the point where it is called. g_simple_async_result_complete_in_idle()
* will finish it from an idle handler in the <link
* If you are interested in writing connection handlers that contain
* blocking code then see #GThreadedSocketService.
*
- * The socket service runs on the main loop in the main thread, and is
- * not threadsafe in general. However, the calls to start and stop
- * the service are threadsafe so these can be used from threads that
+ * The socket service runs on the main loop of the <link
+ * linkend="g-main-context-push-thread-default-context">thread-default
+ * context</link> of the thread it is created in, and is not
+ * threadsafe in general. However, the calls to start and stop the
+ * service are thread-safe so these can be used from threads that
* handle incoming clients.
*
* Since: 2.22
* Starts the service, i.e. start accepting connections
* from the added sockets when the mainloop runs.
*
- * This call is threadsafe, so it may be called from a thread
+ * This call is thread-safe, so it may be called from a thread
* handling an incoming client request.
*
* Since: 2.22
* Stops the service, i.e. stops accepting connections
* from the added sockets when the mainloop runs.
*
- * This call is threadsafe, so it may be called from a thread
+ * This call is thread-safe, so it may be called from a thread
* handling an incoming client request.
*
* Since: 2.22
* The interaction of this source when combined with native UNIX
* functions like sigprocmask() is not defined.
*
- * <note>For reliable behavior, if your program links to gthread
- * (either directly or indirectly via GObject, GIO, or a higher level
- * library), you should ensure g_thread_init() is called before using
- * this function. For example, if your program uses GObject, call
- * g_type_init().</note>
- *
* The source will not initially be associated with any #GMainContext
* and must be added to one with g_source_attach() before it will be
* executed.
* add their #GSource<!-- -->s to. (Note that even in single-threaded
* programs applications may sometimes want to temporarily push a
* non-default context, so it is not safe to assume that this will
- * always return %NULL if threads are not initialized.)
+ * always return %NULL if you are running in the default thread.)
*
* Returns: (transfer none): the thread-default #GMainContext, or
* %NULL if the thread-default context is the global default context.
/* GLIB - Library of useful routines for C programming
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
*
- * GAsyncQueue: thread pool implementation.
+ * GThreadPool: thread pool implementation.
* Copyright (C) 2000 Sebastian Wilhelmi; University of Karlsruhe
*
* This library is free software; you can redistribute it and/or