Example #1
0
 public static Unit sync(Action op, Isolation isolation = Isolation.Snapshot) =>
 STM.DoTransaction(() => { op(); return(unit); }, isolation);
Example #2
0
 public static Task <R> sync <R>(Func <Task <R> > op, Isolation isolation = Isolation.Snapshot) =>
 STM.DoTransaction(async() => await op().ConfigureAwait(false), isolation).AsTask();
Example #3
0
 public static Task <Unit> sync(Func <Task> op, Isolation isolation = Isolation.Snapshot) =>
 STM.DoTransaction(async() => { await op().ConfigureAwait(false); return(unit); }, isolation).AsTask();
Example #4
0
 public static ValueTask <R> sync <R>(Func <ValueTask <R> > op, Isolation isolation = Isolation.Snapshot) =>
 STM.DoTransaction(op, isolation);
Example #5
0
 public static Aff <RT, R> sync <RT, R>(Aff <RT, R> op, Isolation isolation = Isolation.Snapshot) where RT : struct, HasCancel <RT> =>
 STM.DoTransaction(op, isolation);
Example #6
0
 public static Aff <R> sync <R>(Aff <R> op, Isolation isolation = Isolation.Snapshot) =>
 STM.DoTransaction(op, isolation);
Example #7
0
 public static Eff <RT, R> sync <RT, R>(Eff <RT, R> op, Isolation isolation = Isolation.Snapshot) where RT : struct =>
 STM.DoTransaction(op, isolation);
Example #8
0
 public static Ref <A> Ref <A>(A value, Func <A, bool> validator = null) =>
 STM.NewRef(value);