prepare


Description:

public abstract async void prepare () throws Error

Prepare the PersonaStore for use.

This connects the PersonaStore to whichever backend-specific services it requires to be able to provide Personas. This should be called after connecting to the PersonaStore.personas_changed signal, or a race condition could occur, with the signal being emitted before your code has connected to it, and Persona s getting "lost" as a result.

This is normally handled transparently by the IndividualAggregator.

If this function throws an error, the PersonaStore will not be functional.

This function is guaranteed to be idempotent (since version 0.3.0).

Concurrent calls to this function from different threads will block until preparation has completed. However, concurrent calls to this function from a single thread might not, i.e. the first call will block but subsequent calls might return before the first one. (Though they will be safe in every other respect.)

Exceptions:

GLib.Error

if preparing the backend-specific services failed — this will be a backend-specific error

Since:

0.1.11