Пример #1
0
        /// <summary>
        /// Initializes a new ThreadJob.
        /// </summary>
        /// <param name="worker">A delegate that will be called to perform the actual work.</param>
        /// <param name="workerArgs">A parameter that will be passed to the worker delegate.</param>
        /// <param name="completedcallback">A delegate that will be called in the main thread when the job has completed.</param>
        public ThreadJob(JobWorker worker, object workerArgs, JobCompletedCallback completedcallback)
        {
            SyncRoot = new object();

            m_Worker    = worker;
            m_Completed = completedcallback;
            m_JobArgs   = workerArgs;
            m_Enqueued  = DateTime.MinValue;
            m_Status    = JobStatus.New;
        }
Пример #2
0
        /// <summary>
        /// Initializes a new ThreadJob.
        /// </summary>
        /// <param name="worker">A delegate that will be called to perform the actual work.</param>
        /// <param name="workerArgs">A parameter that will be passed to the worker delegate. Can be null.</param>
        public ThreadJob(JobWorker worker, object workerArgs)
        {
            SyncRoot = new object();

            m_Worker    = worker;
            m_JobArgs   = workerArgs;
            m_Completed = null;
            m_Enqueued  = DateTime.MinValue;
            m_Status    = JobStatus.New;
        }
Пример #3
0
		/// <summary>
		/// Initializes a new ThreadJob.
		/// </summary>
		/// <param name="worker">A delegate that will be called to perform the actual work.</param>
		/// <param name="workerArgs">A parameter that will be passed to the worker delegate.</param>
		/// <param name="completedcallback">A delegate that will be called in the main thread when the job has completed.</param>
		public ThreadJob(JobWorker worker, object workerArgs, JobCompletedCallback completedcallback)
		{
			SyncRoot = new object();

			m_Worker = worker;
			m_Completed = completedcallback;
			m_JobArgs = workerArgs;
			m_Enqueued = DateTime.MinValue;
			m_Status = JobStatus.New;
		}
Пример #4
0
		/// <summary>
		/// Initializes a new ThreadJob.
		/// </summary>
		/// <param name="worker">A delegate that will be called to perform the actual work.</param>
		/// <param name="workerArgs">A parameter that will be passed to the worker delegate. Can be null.</param>
		public ThreadJob(JobWorker worker, object workerArgs)
		{
			SyncRoot = new object();

			m_Worker = worker;
			m_JobArgs = workerArgs;
			m_Completed = null;
			m_Enqueued = DateTime.MinValue;
			m_Status = JobStatus.New;
		}