Skip to content

Instantly share code, notes, and snippets.

@timo
Created February 27, 2017 15:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timo/66551554fd1c5dc02ece46d04fab155a to your computer and use it in GitHub Desktop.
Save timo/66551554fd1c5dc02ece46d04fab155a to your computer and use it in GitHub Desktop.
diff --git a/src/io/eventloop.c b/src/io/eventloop.c
index 06e7e9e..29563fb 100644
--- a/src/io/eventloop.c
+++ b/src/io/eventloop.c
@@ -72,7 +72,9 @@ static uv_loop_t *get_or_vivify_loop(MVMThreadContext *tc) {
if (!instance->event_loop_thread) {
/* Grab starting mutex and ensure we didn't lose the race. */
+ MVM_gc_mark_thread_blocked(tc);
uv_mutex_lock(&instance->mutex_event_loop_start);
+ MVM_gc_mark_thread_unblocked(tc);
if (!instance->event_loop_thread) {
MVMObject *thread, *loop_runner;
int r;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment