mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
d9ca38cdff
* Make BSA routines async
35 lines
909 B
C#
35 lines
909 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Threading.Tasks.Sources;
|
|
|
|
namespace Wabbajack.Common.CSP
|
|
{
|
|
public interface Handler<T>
|
|
{
|
|
/// <summary>
|
|
/// Returns true if this handler has a callback, must work without a lock
|
|
/// </summary>
|
|
bool IsActive { get; }
|
|
|
|
/// <summary>
|
|
/// Returns true if this handler may be blocked, otherwise it must not block
|
|
/// </summary>
|
|
bool IsBlockable { get; }
|
|
|
|
/// <summary>
|
|
/// A unique id for lock aquisition order, 0 if no lock
|
|
/// </summary>
|
|
uint LockId { get; }
|
|
|
|
/// <summary>
|
|
/// Commit to fulfilling its end of the transfer, returns cb, must be called within a lock
|
|
/// </summary>
|
|
/// <returns>A callback</returns>
|
|
T Commit();
|
|
}
|
|
|
|
}
|