ably / ably-asset-tracking-swift

iOS client SDKs for the Ably Asset Tracking service.
Apache License 2.0
9 stars 6 forks source link

Publisher Worker Queue: Trackable Removal Guard #556

Open AndyTWF opened 1 year ago

AndyTWF commented 1 year ago

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).

sync-by-unito[bot] commented 1 year ago

➤ Automation for Jira commented:

The link to the corresponding Jira issue is https://ably.atlassian.net/browse/SDK-3369