Skip to content

Commit

Permalink
Make NewThreadScheduler create Daemon threads
Browse files Browse the repository at this point in the history
This matches the behavior of Schedulers.COMPUTATION_EXECUTOR and Schedulers.IO_EXECUTOR.

See https://groups.google.com/forum/#!topic/rxjava/Qe1qi0aHtnE and ReactiveX#431 (comment)
  • Loading branch information
benjchristensen committed Dec 17, 2013
1 parent 5f4ca71 commit 05d1268
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ private EventLoopScheduler() {

@Override
public Thread newThread(Runnable r) {
return new Thread(r, "RxNewThreadScheduler-" + count.incrementAndGet());
Thread t = new Thread(r, "RxNewThreadScheduler-" + count.incrementAndGet());
t.setDaemon(true);
return t;
}
});
}
Expand Down

0 comments on commit 05d1268

Please sign in to comment.