mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-27 18:10:03 +01:00
docs: Clarify lack of threading guarantees in GArray
Signed-off-by: Philip Withnall <withnall@endlessm.com> https://bugzilla.gnome.org/show_bug.cgi?id=786555
This commit is contained in:
parent
8cac6797d7
commit
2586eb9921
@ -244,7 +244,7 @@ g_array_set_clear_func (GArray *array,
|
||||
* @array: A #GArray
|
||||
*
|
||||
* Atomically increments the reference count of @array by one.
|
||||
* This function is MT-safe and may be called from any thread.
|
||||
* This function is thread-safe and may be called from any thread.
|
||||
*
|
||||
* Returns: The passed in #GArray
|
||||
*
|
||||
@ -275,7 +275,7 @@ static gchar *array_free (GRealArray *, ArrayFreeFlags);
|
||||
*
|
||||
* Atomically decrements the reference count of @array by one. If the
|
||||
* reference count drops to 0, all memory allocated by the array is
|
||||
* released. This function is MT-safe and may be called from any
|
||||
* released. This function is thread-safe and may be called from any
|
||||
* thread.
|
||||
*
|
||||
* Since: 2.22
|
||||
@ -326,6 +326,10 @@ g_array_get_element_size (GArray *array)
|
||||
* If array elements contain dynamically-allocated memory, they should
|
||||
* be freed separately.
|
||||
*
|
||||
* This function is not thread-safe. If using a #GArray from multiple
|
||||
* threads, use only the atomic g_array_ref() and g_array_unref()
|
||||
* functions.
|
||||
*
|
||||
* Returns: the element data if @free_segment is %FALSE, otherwise
|
||||
* %NULL. The element data should be freed using g_free().
|
||||
*/
|
||||
@ -1031,7 +1035,7 @@ static gpointer *ptr_array_free (GPtrArray *, ArrayFreeFlags);
|
||||
* Atomically decrements the reference count of @array by one. If the
|
||||
* reference count drops to 0, the effect is the same as calling
|
||||
* g_ptr_array_free() with @free_segment set to %TRUE. This function
|
||||
* is MT-safe and may be called from any thread.
|
||||
* is thread-safe and may be called from any thread.
|
||||
*
|
||||
* Since: 2.22
|
||||
*/
|
||||
@ -1062,6 +1066,10 @@ g_ptr_array_unref (GPtrArray *array)
|
||||
* be freed separately if @free_seg is %TRUE and no #GDestroyNotify
|
||||
* function has been set for @array.
|
||||
*
|
||||
* This function is not thread-safe. If using a #GPtrArray from multiple
|
||||
* threads, use only the atomic g_ptr_array_ref() and g_ptr_array_unref()
|
||||
* functions.
|
||||
*
|
||||
* Returns: the pointer array if @free_seg is %FALSE, otherwise %NULL.
|
||||
* The pointer array should be freed using g_free().
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user