Many thanks.
...ant
if an executor-service task itself (callable or runnable) is executing
another task you should make sure the inner task is not executed on
the same executor-service.
You can create independent executor-services by name.
Hazelcast.getExecutorService(name);
We can completely avoid having the deadlock by changing the
executor-service implementation to use unbounded (cached) thread-pool
instead. I just don't like threads to come and go as they contain
thread-local data. not 100% sure convienced though.
-talip
> --
> You received this message because you are subscribed to the Google Groups "Hazelcast" group.
> To post to this group, send email to haze...@googlegroups.com.
> To unsubscribe from this group, send email to hazelcast+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/hazelcast?hl=en.
>
>
private ExecutorService getExecutorService() {
String threadName = Thread.currentThread().getName();
if (!threadName.startsWith("hz.executor.")) {
return
hzRegistry.getHazelcastInstance().getExecutorService("binding.sca.1");
} else {
String oldName =
threadName.substring(threadName.lastIndexOf("binding.sca."),
threadName.lastIndexOf(".thread-"));
int x =
Integer.parseInt(oldName.substring(oldName.lastIndexOf('.') + 1));
return
hzRegistry.getHazelcastInstance().getExecutorService(oldName.substring(0,
12) + (x + 1));
}
}
...ant
We also better make Hazelcast default executor service be configurable
in a way that you can force it to be cached (unbounded) instead of
fixed. Please create an issue for this.
-talip