mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 06:36:31 +09:00
Refine RealmContext
implementation API
This commit is contained in:
@ -9,20 +9,12 @@ namespace osu.Game.Database
|
||||
{
|
||||
/// <summary>
|
||||
/// The main realm context, bound to the update thread.
|
||||
/// If querying from a non-update thread is needed, use <see cref="GetForRead"/> or <see cref="GetForWrite"/> to receive a context instead.
|
||||
/// </summary>
|
||||
Realm Context { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Get a fresh context for read usage.
|
||||
/// Create a new realm context for use on an arbitrary thread.
|
||||
/// </summary>
|
||||
RealmContextFactory.RealmUsage GetForRead();
|
||||
|
||||
/// <summary>
|
||||
/// Request a context for write usage.
|
||||
/// This method may block if a write is already active on a different thread.
|
||||
/// </summary>
|
||||
/// <returns>A usage containing a usable context.</returns>
|
||||
RealmContextFactory.RealmWriteUsage GetForWrite();
|
||||
Realm CreateContext();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user