示例#1
0
        public IntPtr CreateTask(TaskExecuteRange taskFunction)
        {
            IntPtr task = Native.enkiCreateTaskSet(nativeScheduler, taskFunction);

            if (task == IntPtr.Zero)
            {
                throw new InvalidOperationException("Task creation failed");
            }

            return(task);
        }
示例#2
0
        public TaskSet CreateTask(TaskExecuteRange taskFunction)
        {
            TaskSet task = Native.enkiCreateTaskSet(nativeScheduler, taskFunction);

            if (!task.IsCreated)
            {
                throw new InvalidOperationException("TaskSet creation failed");
            }

            return(task);
        }
示例#3
0
 internal static extern IntPtr enkiCreateTaskSet(IntPtr scheduler, TaskExecuteRange taskFunction);