Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ public List<Runnable> shutdownNow() {
public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException {
long nanos = unit.toNanos(timeout);
long millis = TimeUnit.MILLISECONDS.convert(nanos, TimeUnit.NANOSECONDS);
worker.join(millis, (int) (nanos - millis));
worker.join(millis, (int) (nanos - millis * 1000000));
return !worker.isAlive();
}

Expand Down Expand Up @@ -742,4 +742,4 @@ public int getPoolSize() {
public int getActiveCount() {
return 1;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,9 @@ else if (t.getState() == Thread.State.RUNNABLE)
@Override
public Map<String, String> getRunawayFibers() {
Map<String, String> map = new HashMap<>();
if (problemFibers == null) {
return map;
}
for (Map.Entry<Fiber, StackTraceElement[]> e : problemFibers.entrySet())
map.put(e.getKey().toString(), Strand.toString(e.getValue()));
return map;
Expand Down