/* Sets whether a source can be called recursively. If @can_recurse is TRUE, then while the source is being dispatched then this source will be processed normally. Otherwise, all processing of this source is blocked until the dispatch function returns.  */
void g_source_set_can_recurse(GSource *source, gboolean can_recurse)
/* Sets whether a source can be called recursively. If @can_recurse is TRUE, then while the source is being dispatched then this source will be processed normally. Otherwise, all processing of this source is blocked until the dispatch function returns.  */
void g_source_set_can_recurse(GSource *source, gboolean can_recurse)
{
  GMainContext *context;
  g_return_if_fail (source != NULL);
  context = source->context;
  if (context)
    LOCK_CONTEXT (context);
  if (can_recurse)
    source->flags |= G_SOURCE_CAN_RECURSE;
  else
    source->flags &= ~G_SOURCE_CAN_RECURSE;
  if (context)
    UNLOCK_CONTEXT (context);
}