NdsStoreAccessSync

Synchronizes access to an onboard NDS map.

An object of this class acts as a kind of a reader/writer lock, in that it allows any number of concurrent readers to access the map at the same time, or one writer and nobody else. It also offers facilities for writers to notify all current readers that the map needs to be modified so they (the readers) can 'let go'. After the writer has finished modifying the map, NdsStoreAccessSync will dispatch notifications to all others to let them know the map is accessible once again.

Note: Currently, requesting write access is reserved for use only by NdsStore, and that is why all related functions are marked as internal. In the future, it is expected that any listener will be able to gain write access.

Important: This is a Public Preview API. It may be changed or removed at any time.

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard

Registers a listener so it can be informed about changes in map availability.

Link copied to clipboard
open override fun close()

Stops all synchronization operations.

Link copied to clipboard

Unregisters a listener (if it was previously registered by addListener).