Esempio n. 1
0
        /// <summary>
        /// Start the given agent runner on a new thread.
        /// </summary>
        /// <param name="runner"> the agent runner to start </param>
        /// <param name="threadFactory"> the factory to use to create the thread.</param>
        /// <returns>  the new thread that has been started.</returns>
        public static Thread StartOnThread(AgentRunner runner, IThreadFactory threadFactory)
        {
            var thread = threadFactory.NewThread(runner.Run);

            thread.Name = runner.Agent().RoleName();
            thread.Start();
            return(thread);
        }
Esempio n. 2
0
        /// <summary>
        /// Start the given agent runner on a new thread.
        /// </summary>
        /// <param name="runner"> the agent runner to start </param>
        /// <returns>  the new thread that has been started.</returns>
        public static Thread StartOnThread(AgentRunner runner)
        {
            var thread = new Thread(runner.Run);

            ConfigureThread(thread, runner);
            thread.Start();
            return(thread);
        }
Esempio n. 3
0
        /// <summary>
        /// Start the given agent runner on a new thread.
        /// </summary>
        /// <param name="runner"> the agent runner to start </param>
        /// <param name="threadFactory"> the factory to use to create the thread.</param>
        /// <returns>  the new thread that has been started.</returns>
        public static Thread StartOnThread(AgentRunner runner, IThreadFactory threadFactory)
        {
            var thread = threadFactory.NewThread(runner.Run);

            ConfigureThread(thread, runner);
            thread.Start();
            return(thread);
        }
Esempio n. 4
0
 /// <summary>
 /// Start the given agent runner on a new thread.
 /// </summary>
 /// <param name="runner"> the agent runner to start </param>
 public static void StartOnThread(AgentRunner runner)
 {
     var thread = new Thread(runner.Run)
     {
         Name = runner.Agent().RoleName()
     };
     thread.Start();
 }
Esempio n. 5
0
        /// <summary>
        /// Start the given agent runner on a new thread.
        /// </summary>
        /// <param name="runner"> the agent runner to start </param>
        public static void StartOnThread(AgentRunner runner)
        {
            var thread = new Thread(runner.Run)
            {
                Name = runner.Agent().RoleName()
            };

            thread.Start();
        }
Esempio n. 6
0
 internal Aeron(Context ctx)
 {
     _ctx = ctx.Conclude();
     _conductor = ctx.CreateClientConductor();
     _conductorRunner = ctx.CreateConductorRunner(_conductor);
 }
Esempio n. 7
0
 private static void ConfigureThread(Thread thread, AgentRunner runner)
 {
     thread.Name         = runner.Agent().RoleName();
     thread.IsBackground = true;
 }