コード例 #1
0
ファイル: standard.cpp プロジェクト: orochisam/emojicode
static void threadJoin(Thread *thread) {
    auto cthread = *thread->thisObject()->val<std::thread*>();
    allowGC();
    cthread->join();
    disallowGCAndPauseIfNeeded();
    thread->returnFromFunction();
}
コード例 #2
0
ファイル: standard.cpp プロジェクト: orochisam/emojicode
static void mutexLock(Thread *thread) {
    allowGC();
    (*thread->thisObject()->val<std::mutex*>())->lock();
    disallowGCAndPauseIfNeeded();
    thread->returnFromFunction();
}
コード例 #3
0
ファイル: standard.c プロジェクト: cmenegusWHAT/emojicode
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;
}