INNER CODE UNIT · C#

Startup

Cysharp/LogicLooper · samples/LoopHostingApp/Startup.cs:15

    public class Startup
    {
        public Startup(IConfiguration configuration)
        {
            Configuration = configuration;
        }

        public IConfiguration Configuration { get; }

        // This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureServices(IServiceCollection services)
        {
            // Register a LooperPool to the service container.
            services.AddSingleton<ILogicLooperPool>(_ => new LogicLooperPool(10, Environment.ProcessorCount, RoundRobinLogicLooperPoolBalancer.Instance));
            services.AddHostedService<LoopHostedService>();

            services.AddRazorPages();
        }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…