示例#1
0
        private static Thread GetThread(ForkCall call)
        {
            var thread = new Thread(GetThreadStart(call))
            {
                IsBackground = true
            };

            thread.Start();
            return(thread);
        }
示例#2
0
文件: Fork.cs 项目: attila3453/alsing
 private static ThreadStart GetThreadStart(ForkCall call)
 {
     ThreadStart ts = () => call();
     return ts;
 }
示例#3
0
文件: Fork.cs 项目: attila3453/alsing
 private static Thread GetThread(ForkCall call)
 {
     var thread = new Thread(GetThreadStart(call)) {IsBackground = true};
     thread.Start();
     return thread;
 }
示例#4
0
文件: Fork.cs 项目: attila3453/alsing
 /// <summary>
 /// Queues a call in the fork
 /// </summary>
 /// <param name="call">Delegate that should be executed async</param>
 /// <returns>Returns self</returns>
 public Fork Call(ForkCall call)
 {
     calls.Add(call);
     return this;
 }
示例#5
0
        private static ThreadStart GetThreadStart(ForkCall call)
        {
            ThreadStart ts = () => call();

            return(ts);
        }
示例#6
0
 /// <summary>
 /// Queues a call in the fork
 /// </summary>
 /// <param name="call">Delegate that should be executed async</param>
 /// <returns>Returns self</returns>
 public Fork Call(ForkCall call)
 {
     calls.Add(call);
     return(this);
 }