Handling services that require explicit shutdown in Scala

tail -f development.log

While working on our projects at SoftwareMill we have recently started depending on a few services that require explicit closing. Until now they were closed in a shutdown hook we manually registered. That has started to become error-prone, so I have decided to introduce a simple mechanism for registering those services during their initialization in MacWire-based modules and having a single centralized shutdown handler closing them. In this post I briefly go through the experimental shutdownables API.

View original post 330 more words

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s