deltaspike-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Xavier Dury <kal...@hotmail.com>
Subject @Futureable and void-returning methods
Date Tue, 21 Jun 2016 09:19:02 GMT
Hi,

I was trying to rewrite my @Asynchronous (EJB) methods with @Futureable (Deltaspike) but noticed
that @Futureable does not work with methods returning void.

Was it somehow overlooked or deliberately omitted? I could understand that @Futureable means
that a Future<T> must be returned as its name would suggest.

In my case, I am trying to process elements in parallel and use a CompletionService (which
needs an Executor) to do something after all elements have been processed. I implemented a
simple Executor with @Futureable run() but it does not work because run() is a void method.

Thanks,

Xavier
 		 	   		  
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message