kandersen82 commented on code in PR #109:
URL: https://github.com/apache/pulsar-dotpulsar/pull/109#discussion_r1019878832
##########
src/DotPulsar/Internal/Abstractions/IExecute.cs:
##########
@@ -31,4 +31,16 @@ public interface IExecute
ValueTask<TResult> Execute<TResult>(Func<Task<TResult>> func,
CancellationToken cancellationToken = default);
ValueTask<TResult> Execute<TResult>(Func<ValueTask<TResult>> func,
CancellationToken cancellationToken = default);
+
+ ValueTask<bool> TryExecuteOnce(Action action, CancellationToken
cancellationToken = default);
+
+ ValueTask<bool> TryExecuteOnce(Func<Task> func, CancellationToken
cancellationToken = default);
+
+ ValueTask<bool> TryExecuteOnce(Func<ValueTask> func, CancellationToken
cancellationToken = default);
+
+ ValueTask<(bool success, TResult? result)>
TryExecuteOnce<TResult>(Func<TResult> func, CancellationToken cancellationToken
= default);
Review Comment:
I will create a type instead
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]