Exemplo n.º 1
0
 public override void Stop()
 {
     if (taskPump != null)
     {
         taskPump.Quit();
         taskPump = null;
     }
 }
        /// <summary>
        /// Initializes a new instance.
        /// </summary>
        /// <param name="actor"></param>
        public ActivityWorkflowHost(IActivityActorInternal actor)
        {
            this.actor = actor ?? throw new ArgumentNullException(nameof(actor));

            // to enqueue task functions to execute in actor context
            pump            = new TaskPump();
            pump.TaskAdded += (s, a) => actor.InvokeWithTimer(pump.PumpOneAsync);
        }
Exemplo n.º 3
0
        public override bool Start()
        {
            if (taskPump != null)
            {
                return(true);
            }

            taskPump = new TaskPump();
            return(true);
        }
        /// <summary>
        /// Initializes a new instance.
        /// </summary>
        /// <param name="actor"></param>
        public ActivityWorkflowHost(IActivityActorInternal actor)
        {
            Contract.Requires <ArgumentNullException>(actor != null);

            this.actor = actor;

            // to enqueue task functions to execute in actor context
            pump            = new TaskPump();
            pump.TaskAdded += (s, a) => actor.InvokeWithTimer(pump.PumpOneAsync);
        }
Exemplo n.º 5
0
 public CommonTaskProcesser(TaskPump _taskPump)
 {
     taskPump = _taskPump;
 }