mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 07:23:41 +02:00
gio: GCancellable can be used concurrently
* Update documentation to note that GCancellable can be used concurrently by multiple operations. * Add documentation to g_cancellable_reset that behavior is undefined if called from within cancelled handler. * Add test for multiple concurrent operations using the same cancellable. https://bugzilla.gnome.org/show_bug.cgi?id=656387
This commit is contained in:
@@ -171,7 +171,7 @@ g_cancellable_init (GCancellable *cancellable)
|
||||
* and pass it to the operations.
|
||||
*
|
||||
* One #GCancellable can be used in multiple consecutive
|
||||
* operations, but not in multiple concurrent operations.
|
||||
* operations or in multiple concurrent operations.
|
||||
*
|
||||
* Returns: a #GCancellable.
|
||||
**/
|
||||
@@ -251,7 +251,10 @@ g_cancellable_get_current (void)
|
||||
* g_cancellable_reset:
|
||||
* @cancellable: a #GCancellable object.
|
||||
*
|
||||
* Resets @cancellable to its uncancelled state.
|
||||
* Resets @cancellable to its uncancelled state.
|
||||
*
|
||||
* If cancellable is currently in use by any cancellable operation
|
||||
* then the behavior of this function is undefined.
|
||||
**/
|
||||
void
|
||||
g_cancellable_reset (GCancellable *cancellable)
|
||||
|
Reference in New Issue
Block a user