コード例 #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);
        }
コード例 #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);
        }
コード例 #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);
        }
コード例 #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();
 }
コード例 #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();
        }
コード例 #6
0
 internal Aeron(Context ctx)
 {
     _ctx = ctx.Conclude();
     _conductor = ctx.CreateClientConductor();
     _conductorRunner = ctx.CreateConductorRunner(_conductor);
 }
コード例 #7
0
 private static void ConfigureThread(Thread thread, AgentRunner runner)
 {
     thread.Name         = runner.Agent().RoleName();
     thread.IsBackground = true;
 }