I ran into the same problem and came to the conclusion this was a bug. I ended up changing the method executeOperation()
in AsyncOperationExecutor.java:
case QueryList:
operation.result = ((Query) operation.parameter).forCurrentThread().list();
break;
case QueryUnique:
operation.result = ((Query) operation.parameter).forCurrentThread().unique();
break;
Adding in the call to forCurrentThread()
changes the owning thread of the Query to the thread of the ExecutorService. This made it work for me, I wonder if there is a better solution though.