Exemplo n.º 1
0
        public static ThreadResultCode CreateThread(
            ThreadStartRoutine startRoutine,
            out ThreadId threadId)
        {
            threadId = default(ThreadId);
            var startRoutinePtr = #builtin_ref_to_ptr(startRoutine);

            return((ThreadResultCode)pthread_create(
                       &threadId.id,
                       (pthread_attr_t *)null,
                       LoadDelegateFunctionPointerInternal(RunStartRoutine),
                       startRoutinePtr));
        }
Exemplo n.º 2
0
 public static ThreadResultCode JoinThread(ThreadId threadId)
 {
     return((ThreadResultCode)pthread_join(threadId.id, null));
 }