public WorkerToken StartDedicatedWorker()
            {
                var token = _inner.StartDedicatedWorker();

                _tokens.Add(token);
                return(token);
            }
Exemplo n.º 2
0
        public ISubscription <TPayload> BuildSubscription()
        {
            if (_useDedicatedThread)
            {
                _threadId = _workerPool.StartDedicatedWorker().ThreadId;
            }

            var subscription = GetOrCreateSubscriptionBase();

            subscription = WrapSubscription(subscription);
            return(subscription);
        }
Exemplo n.º 3
0
        public IParticipant <TRequest, TResponse> BuildParticipant()
        {
            if (_useDedicatedThread)
            {
                _threadId = _workerPool.StartDedicatedWorker().ThreadId;
            }

            if (_funcReference == null)
            {
                throw new Exception("No actions defined");
            }
            var participant = CreateParticipant(_funcReference, _dispatchType, _threadId, _name);

            participant = WrapParticipant(participant, _filter, _maxRequests);
            return(participant);
        }