Пример #1
0
        public void Act(ActorActionEvent action, long actMs = 0L, object state = null, CancellationTokenSource cancellationToken = null)
        {
            long num = DateTime.Now.UnixMilliseconds();
            if (actMs < num)
                actMs = num;

            _actions.Enqueue(new ActorAction
            {
                Action = action,
                ActMs = actMs,
                State = state,
                CancellationToken = cancellationToken
            });
        }
Пример #2
0
        public void Act(ActorActionEvent action, long actMs = 0L, object state = null, CancellationTokenSource cancellationToken = null)
        {
            long num = DateTime.Now.UnixMilliseconds();

            if (actMs < num)
            {
                actMs = num;
            }

            _actions.Enqueue(new ActorAction
            {
                Action            = action,
                ActMs             = actMs,
                State             = state,
                CancellationToken = cancellationToken
            });
        }