示例#1
0
        public FiberProvider <TKey> GetConfiguredProvider(ChannelBuilder <TChannel> builder)
        {
            FiberProvider <TKey> configuredProvider = GetConfiguredFiberProvider();

            builder.AddDisposable(configuredProvider);

            return(configuredProvider);
        }
        protected Fiber GetConfiguredFiber <TChannel>(ChannelBuilder <TChannel> builder)
        {
            Fiber fiber = GetConfiguredFiberFactory()();

            builder.AddDisposable(fiber.ShutdownOnDispose(_shutdownTimeout));

            return(fiber);
        }
示例#3
0
        protected Scheduler GetConfiguredScheduler <TChannel>(ChannelBuilder <TChannel> builder)
        {
            Scheduler scheduler = _schedulerFactory();

            if (_owned)
            {
                builder.AddDisposable(scheduler.ShutdownOnDispose(ShutdownTimeout));
            }

            return(scheduler);
        }
示例#4
0
 public void AddDisposable(IDisposable disposable)
 {
     _builder.AddDisposable(disposable);
 }