-
- Downloads
Avoid a race condition in RetryingExecutorService (#278)
This fixes #274, which occurs when the task completes before the `Future` is added to the `callables` map (because the corresponding submit() is still executing). In that case, `callable` is null, which causes latches.get(callable) to throw an NPE. The bug can be reproduced with the added test by adding `Thread.sleep(1000)` below the `completionService.submit` call.
Showing
- rosjava/src/main/java/org/ros/concurrent/RetryingExecutorService.java 10 additions, 3 deletions...main/java/org/ros/concurrent/RetryingExecutorService.java
- rosjava/src/test/java/org/ros/concurrent/RetryingExecutorServiceTest.java 64 additions, 0 deletions.../java/org/ros/concurrent/RetryingExecutorServiceTest.java
Please register or sign in to comment