[jboss-jira] [JBoss JIRA] (WFLY-6672) EJB's async methods' Future#get should treat zero timeout as "don't wait"

Vsevolod Golovanov (JIRA) issues at jboss.org
Sat Jun 4 09:52:00 EDT 2016


Vsevolod Golovanov created WFLY-6672:
----------------------------------------

             Summary: 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


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
(v6.4.11#64026)


More information about the jboss-jira mailing list