TransactionHelper.runInTransaction taking a Supplier<R> is useful to have, in addition to the signature taking a Runnable already added during NXP-19361.
This allows callers to do:
return TransactionHelper.runInTransaction(() -> {...; return someObject;});
and (with Runnable):
TransactionHelper.runInTransaction(() -> {...});
- depends on
-
NXP-19361 Don't allow use of CoreSession outside a transaction
- Resolved