ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vladisav Jelisavcic (JIRA)" <j...@apache.org>
Subject [jira] [Created] (IGNITE-2399) Add asynchronous acquire to IgniteSemaphore
Date Mon, 18 Jan 2016 19:42:39 GMT
Vladisav Jelisavcic created IGNITE-2399:
-------------------------------------------

             Summary: Add asynchronous acquire to IgniteSemaphore
                 Key: IGNITE-2399
                 URL: https://issues.apache.org/jira/browse/IGNITE-2399
             Project: Ignite
          Issue Type: Improvement
          Components: data structures
            Reporter: Vladisav Jelisavcic
             Fix For: 1.6


Usually a permit acquisition is followed by an action, followed by a release of the permit.
A simple enhancement to the existing Semaphore API can be made that enables asynchronous acquire:

<T> IgniteFuture<T> acquireAndExecute(Callable<T> action, int numPermits);

The method would immediately return a future to be later completed by the action's result.
Permits are to be released after the future is completed.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message