As part of AAT-Android's worker queue, we have the notion of a "trackable removal guard", that is, trackables that have been marked as "pending removal". This allows us to guard against users trying to re-add trackables whilst asynchronous operations are in the process of removing them.
A trackable can be added to the guard with a number of handlers, these handlers take a Result<boolean>.
When a trackable is removed from the guard, and handlers are called with the specified result.
The following operations should suspend/wait whilst a trackable is in the process of being removed:
Adding a trackable
There are a number of operations that should not take place in the event of a trackable being marked for removal, however this will be covered by introducing other workers.
At this point we should also implement the following worker:
TrackableRemovalSuccess
This worker is responsible for removing the worker from the Trackable Removal Guard (along with a success/failure result).
As part of AAT-Android's worker queue, we have the notion of a "trackable removal guard", that is, trackables that have been marked as "pending removal". This allows us to guard against users trying to re-add trackables whilst asynchronous operations are in the process of removing them.
A trackable can be added to the guard with a number of handlers, these handlers take a
Result<boolean>
.When a trackable is removed from the guard, and handlers are called with the specified result.
The following operations should suspend/wait whilst a trackable is in the process of being removed:
There are a number of operations that should not take place in the event of a trackable being marked for removal, however this will be covered by introducing other workers.
At this point we should also implement the following worker:
This worker is responsible for removing the worker from the Trackable Removal Guard (along with a success/failure result).