Closed DarkWeird closed 3 years ago
Hmm, what are we dealing with here. The docs for the old form of Futures.addCallback say:
Deprecated. Use the overload that requires an executor. For identical behavior, pass MoreExecutors.directExecutor(), but consider whether another executor would be safer, as discussed in the ListenableFuture.addListener documentation. This method is scheduled to be removed in April 2018.
Creating a new thread in every FindPathToNode action instance sounds scary to me, so I'm inclined to stick with directExecutor
for this.
If we're worried about the callback being slow (should we expect entity.saveComponent to be slow?) we can revisit, but directExecutor keeps the current behavior.
Part of https://github.com/MovingBlocks/Terasology/pull/4557