예제 #1
0
static void threadJoin(Thread *thread) {
    auto cthread = *thread->thisObject()->val<std::thread*>();
    allowGC();
    cthread->join();
    disallowGCAndPauseIfNeeded();
    thread->returnFromFunction();
}
예제 #2
0
static void mutexLock(Thread *thread) {
    allowGC();
    (*thread->thisObject()->val<std::mutex*>())->lock();
    disallowGCAndPauseIfNeeded();
    thread->returnFromFunction();
}
예제 #3
0
static Something threadJoin(Thread *thread) {
    allowGC();
    bool l = pthread_join(*(pthread_t *)((Object *)stackGetThisObject(thread))->value, NULL) == 0;
    disallowGCAndPauseIfNeeded();
    return l ? EMOJICODE_TRUE : EMOJICODE_FALSE;
}