As discussed here, I'd like to kindly ask for an enhancement which would allow me to execute services with optional concurrency.
Ideally, I'd like an annotation like this:
@Service
@RunLevel(value = 3, concurrency = 5)
public class MyConcurrentService {
...
In theory, this could be achieved by defining a custom Executor and registering it with the RunLevelController service. However, the Executor is not aware of how specifically it is supposed to be executing the passed Runnable.
Also, as far as I understand, RunLevel services are always of Singleton scope. This may lead to unexpected behaviour when destroying a service multiple times (going down in run-levels).
As discussed here, I'd like to kindly ask for an enhancement which would allow me to execute services with optional concurrency.
Ideally, I'd like an annotation like this:
In theory, this could be achieved by defining a custom Executor and registering it with the RunLevelController service. However, the Executor is not aware of how specifically it is supposed to be executing the passed Runnable.
Also, as far as I understand, RunLevel services are always of Singleton scope. This may lead to unexpected behaviour when destroying a service multiple times (going down in run-levels).