Пример #1
0
        public static CustomizedThread createThread(ThreadTypes ThreadName, CancellationTokenSource _tokenSource, ICloneable _threadParameter)
        {
            CustomizedThread thread = null;

            switch (ThreadName)
            {
            case ThreadTypes.UpdateBoneData:
                thread = new UpdateBoneDataThread(_tokenSource, _threadParameter);
                break;

            case ThreadTypes.WriteBoneData:
                thread = new WriteBoneDataThread(_tokenSource, _threadParameter);
                break;

            default:
                break;
            }
            return(thread);
        }
Пример #2
0
 public ThreadContext(ThreadTypes ThreadName, CancellationTokenSource _tokenSource, ICloneable _threadParameter)
 {
     superThread = ThreadFactory.createThread(ThreadName, _tokenSource, _threadParameter);
 }