mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
gthreadedresolver: Remove some incorrect assertions
If a timeout executes on the same main context iteration as completion or cancellation of a resolver lookup, `has_returned` will be set multiple times. That’s fine (the `GCond` will be notified multiple times, but that’s fine). It was triggering an incorrect assertion, so remove that. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
parent
7922d3200c
commit
865cbe3714
@ -1439,7 +1439,6 @@ timeout_cb (gpointer user_data)
|
||||
|
||||
/* Signal completion of the task. */
|
||||
g_mutex_lock (&data->lock);
|
||||
g_assert (!data->has_returned);
|
||||
data->has_returned = TRUE;
|
||||
g_cond_broadcast (&data->cond);
|
||||
g_mutex_unlock (&data->lock);
|
||||
@ -1470,7 +1469,6 @@ cancelled_cb (GCancellable *cancellable,
|
||||
|
||||
/* Signal completion of the task. */
|
||||
g_mutex_lock (&data->lock);
|
||||
g_assert (!data->has_returned);
|
||||
data->has_returned = TRUE;
|
||||
g_cond_broadcast (&data->cond);
|
||||
g_mutex_unlock (&data->lock);
|
||||
@ -1605,7 +1603,6 @@ threaded_resolver_worker_cb (gpointer task_data,
|
||||
|
||||
/* Signal completion of a task. */
|
||||
g_mutex_lock (&data->lock);
|
||||
g_assert (!data->has_returned);
|
||||
data->has_returned = TRUE;
|
||||
g_cond_broadcast (&data->cond);
|
||||
g_mutex_unlock (&data->lock);
|
||||
|
Loading…
Reference in New Issue
Block a user