Ejemplo n.º 1
0
        /// <inheritdoc />
        public Task RegisterActionAsync(LogicLooperActionDelegate loopAction)
        {
            var action = new LogicLooper.LooperAction(LogicLooper.DelegateHelper.GetWrapper(), loopAction, default);

            lock (_actions)
            {
                _actions.Add(action);
            }
            return(action.Future.Task);
        }
Ejemplo n.º 2
0
 /// <inheritdoc />
 public Task RegisterActionAsync(LogicLooperActionDelegate loopAction)
 => _balancer.GetPooledLooper(_loopers).RegisterActionAsync(loopAction);
Ejemplo n.º 3
0
 public Task RegisterActionAsync(LogicLooperActionDelegate loopAction)
 => throw new InvalidOperationException("LogicLooper.Shared is not initialized yet.");
Ejemplo n.º 4
0
        /// <summary>
        /// Registers a loop-frame action to the looper and returns <see cref="Task"/> to wait for completion.
        /// </summary>
        /// <param name="loopAction"></param>
        /// <returns></returns>
        public Task RegisterActionAsync(LogicLooperActionDelegate loopAction)
        {
            var action = new LooperAction(DelegateHelper.GetWrapper(), loopAction, null);

            return(RegisterActionAsyncCore(action));
        }
Ejemplo n.º 5
0
 /// <inheritdoc />
 public Task RegisterActionAsync(LogicLooperActionDelegate loopAction)
 {
     return(Loopers[0].RegisterActionAsync(loopAction));
 }