kstyrc / embedded-redis

Redis embedded server for Java integration testing
840 stars 368 forks source link

Hanging thread on shutdown in Tomcat #50

Closed adsgreen closed 9 years ago

adsgreen commented 9 years ago

The abstract Redis instance contains a single thread pool:

private final ExecutorService executor = Executors.newSingleThreadExecutor();

This creates a non daemon thread and there is no call to executor.shutdown() in the stop method. As such this causes an appserver with an embedded redis server to hang.

kstyrc commented 9 years ago

Hmm, valid case. Thanks for pointing out I'll try to make ExecutorService running daemon threads.