atris commented on a change in pull request #8820:
URL: https://github.com/apache/ignite/pull/8820#discussion_r591338424



##########
File path: modules/core/src/main/java/org/apache/ignite/IgniteSemaphore.java
##########
@@ -244,6 +247,16 @@ public boolean tryAcquire(int permits, long timeout, 
TimeUnit unit)
      */
     public void acquire(int permits) throws IgniteInterruptedException;
 
+    /**
+     * Acquires the given semaphore, executes the given callable and schedules 
the release of permits asynchronously
+     *
+     * @param callable the callable to execute
+     * @param numPermits the number of permits to acquire
+     * @throws Exception if the callable throws an exception
+     */
+    public <T> IgniteFuture<T> 
acquireAndExecute(IgniteCallable<IgniteFuture<T>> callable,
+                                                 int numPermits) throws 
Exception;
+

Review comment:
       Agreed, fixed the same




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to