Skip to content

Commit

Permalink
Block/unblock thread for GC on semaphore wait.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Jul 21, 2016
1 parent c01472d commit 236058a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/6model/reprs/Semaphore.c
Expand Up @@ -113,7 +113,9 @@ MVMint64 MVM_semaphore_tryacquire(MVMThreadContext *tc, MVMSemaphore *sem) {
}

void MVM_semaphore_acquire(MVMThreadContext *tc, MVMSemaphore *sem) {
MVM_gc_mark_thread_blocked(tc);
uv_sem_wait(&sem->body.sem);
MVM_gc_mark_thread_unblocked(tc);
}

void MVM_semaphore_release(MVMThreadContext *tc, MVMSemaphore *sem) {
Expand Down

0 comments on commit 236058a

Please sign in to comment.