- /*
- * mono-threads.c: Coop threading
+/**
+ * \file
+ * Coop threading
*
* Author:
* Rodrigo Kumpera (kumpera@gmail.com)
default:
g_error ("Unknown thread state");
}
+
+ if (info->async_target) {
+ info->async_target (info->user_data);
+ info->async_target = NULL;
+ info->user_data = NULL;
+ }
}
void
g_error ("Unknown thread state");
}
+ if (info->async_target) {
+ info->async_target (info->user_data);
+ info->async_target = NULL;
+ info->user_data = NULL;
+ }
+
return info;
}
#else
static int is_coop_enabled = -1;
if (G_UNLIKELY (is_coop_enabled == -1))
- is_coop_enabled = g_getenv ("MONO_ENABLE_COOP") != NULL ? 1 : 0;
+ is_coop_enabled = g_hasenv ("MONO_ENABLE_COOP") ? 1 : 0;
return is_coop_enabled == 1;
#endif
}