[jboss-jira] [JBoss JIRA] (WFLY-6672) EJB's async methods' Future#get should treat zero timeout as "don't wait"
Daniel Čihák (JIRA)
issues at jboss.org
Wed Feb 8 09:07:01 EST 2017
[ https://issues.jboss.org/browse/WFLY-6672?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13360371#comment-13360371 ]
Daniel Čihák edited comment on WFLY-6672 at 2/8/17 9:06 AM:
------------------------------------------------------------
Pull request with test https://github.com/wildfly/wildfly/pull/9617.
was (Author: dcihak):
Pull request with test https://github.com/jbossas/jboss-eap7/pull/1282.
> EJB's async methods' Future#get should treat zero timeout as "don't wait"
> -------------------------------------------------------------------------
>
> Key: WFLY-6672
> URL: https://issues.jboss.org/browse/WFLY-6672
> Project: WildFly
> Issue Type: Bug
> Components: EJB
> Affects Versions: 8.2.0.Final
> Reporter: Vsevolod Golovanov
> Assignee: Stuart Douglas
> Fix For: 10.1.0.CR1, 10.1.0.Final
>
>
> Say there is an asynchronous EJB method:
> {code}
> @Asynchronous
> public Future<Boolean> method() {
> ...
> }
> {code}
> Calling Future#get with a zero timeout:
> {code}
> if (bean.method().get(0, TimeUnit.MILLISECONDS))
> {code}
> results in a block until the task is finished.
> Instead I expected zero waiting, because {{java.util.concurrent.Future.get(long, TimeUnit)}} doesn't specify any special treatment for a zero timeout value.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
More information about the jboss-jira
mailing list