Skip to content

Commit

Permalink
[split] util-core: Create daemon threads in all stock `com.twitter.ut…
Browse files Browse the repository at this point in the history
…il.FuturePool`s

util-core's default `ExecutorService`s create non-daemon threads, which don't
play nicely with graceful shutdown functionality. This change forces all stock
FuturePool implementations to spawn daemon threads. All threads created by
FuturePools will be daemonized, which will improve the graceful shutdown case.

RB_ID=296659
  • Loading branch information
Evan Meagher authored and CI committed Feb 27, 2014
1 parent effc0a4 commit 18aa3a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion util-core/src/main/scala/com/twitter/util/FuturePool.scala
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ object FuturePool {
}

private lazy val defaultExecutor = Executors.newCachedThreadPool(
new NamedPoolThreadFactory("UnboundedFuturePool")
new NamedPoolThreadFactory("UnboundedFuturePool", makeDaemons = true)
)

/**
Expand Down

0 comments on commit 18aa3a5

Please sign in to comment.