[jira] [Commented] (IGNITE-2399) Add asynchronous acquire to IgniteSemaphore

2021-03-30 Thread Dmitry Pavlov (Jira)


[ 
https://issues.apache.org/jira/browse/IGNITE-2399?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17311290#comment-17311290
 ] 

Dmitry Pavlov commented on IGNITE-2399:
---

[~atri] [~vkulichenko], it seems that the test
https://ci.ignite.apache.org/test/-3059424454524523197?currentProjectId=IgniteTests24Java8=buildStartDate=desc=%3Cdefault%3E

is started to fail after this PR merge. Could you please check if it is related?

> 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
>Assignee: Atri Sharma
>Priority: Major
>  Time Spent: 3h
>  Remaining Estimate: 0h
>
> 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:
>  IgniteFuture acquireAndExecute(Callable 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
(v8.3.4#803005)


[jira] [Commented] (IGNITE-2399) Add asynchronous acquire to IgniteSemaphore

2021-02-22 Thread Atri Sharma (Jira)


[ 
https://issues.apache.org/jira/browse/IGNITE-2399?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17288289#comment-17288289
 ] 

Atri Sharma commented on IGNITE-2399:
-

PR is available

> 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
>Assignee: Atri Sharma
>Priority: Major
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> 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:
>  IgniteFuture acquireAndExecute(Callable 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
(v8.3.4#803005)


[jira] [Commented] (IGNITE-2399) Add asynchronous acquire to IgniteSemaphore

2017-09-27 Thread Andrey Kuznetsov (JIRA)

[ 
https://issues.apache.org/jira/browse/IGNITE-2399?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16182224#comment-16182224
 ] 

Andrey Kuznetsov commented on IGNITE-2399:
--

Why should this high-level functionality pollute Semaphore API? Resource 
acquisition control is not an only semaphore use case. To my mind, it's better 
to put this method to some utility class like IgniteUtils.

> 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
>
> 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:
>  IgniteFuture acquireAndExecute(Callable 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.4.14#64029)


[jira] [Commented] (IGNITE-2399) Add asynchronous acquire to IgniteSemaphore

2016-01-19 Thread Andrey Kornev (JIRA)

[ 
https://issues.apache.org/jira/browse/IGNITE-2399?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15106509#comment-15106509
 ] 

Andrey Kornev commented on IGNITE-2399:
---

In order to support async actions (as per ticket description) the method 
signature should be 

{code}
 IgniteFuture acquireAndExecute(Callable action, int 
numPermits);
{code}

Such signature makes the contract explicit, and more importantly it correctly 
unwraps the input future to return the type T and not {{IgniteFuture}} as 
would be the case with the original signature.

> 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:
>  IgniteFuture acquireAndExecute(Callable 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)