Example #1
0
 /// <summary>
 /// Create a task.
 /// </summary>
 /// <param name="mainThread"> Can the task only be run on the main thread</param>
 /// <param name="key">The key to identify the task. Can be null</param>
 protected ThreadedTask(bool isThreaded)
 {
     m_scheduler = null;
     m_isThreaded = isThreaded;
     m_listeners = new LinkedList<TaskListener>();
     m_listener = new TaskListener(this);
 }
Example #2
0
 protected ThreadedTask(bool isThreaded)
 {
     this.m_scheduler  = null;
     this.m_isThreaded = isThreaded;
     this.m_listeners  = new LinkedList <TaskListener>();
     this.m_listener   = new TaskListener(this);
 }
Example #3
0
 /// <summary>
 /// Create a task.
 /// </summary>
 /// <param name="mainThread"> Can the task only be run on the main thread</param>
 /// <param name="key">The key to identify the task. Can be null</param>
 ///
 //OYM:
 protected ThreadedTask(bool isThreaded)
 {
     m_scheduler  = null;                            //OYM:  目前还没有scheduler
     m_isThreaded = isThreaded;                      //OYM:  目前是true
     m_listeners  = new LinkedList <TaskListener>(); //OYM:  监听器,以及为啥这里用的是链表,链表线程安全吗?
     m_listener   = new TaskListener(this);
 }