sub interrupt { $self->{interruptionTime} = time }
sub resume { $self->{giveup}{time} += time - $self->{interruptionTime} }
- can be handled in base class with unified method of storing timeouts in tasks
Why not a task like "waiting for bot to log in"?
That task is:
- created by an event (log out)
- mutually excluded to run simultaneously with all other tasks that are not allowed to execute while being logged off
- of higher priority than those other tasks
One ST0 to rule them all? One PE viewer to find them!
One ST_kRO to bring them all and in the darkness bind them...
sub interrupt { $self->{interruptionTime} = time }
sub resume { $self->{giveup}{time} += time - $self->{interruptionTime} }
- can be handled in base class with unified method of storing timeouts in tasks
Why not a task like "waiting for bot to log in"?
That task is:
- created by an event (log out)
- mutually excluded to run simultaneously with all other tasks that are not allowed to execute while being logged off
- of higher priority than those other tasks
Agree. But that task must be in "Idle" state while Active. So It block all other tasks, yet does not consume CPU time.