Kill sbt forked jvm
Recently I’ve been playing with akka under sbt. I often run sbt console and then use run command to execute my app. It works great for single threaded applications that exits by itself. When using akka, there are couple of threads that do not quit. Hitting ctrl+c quits running application AND unfortunately also sbt. I figured out, that it can be fixed with a little bit of hacking.
First, set fork in run := true is build.sbt. Then you can stop forked jam with the following shell line:
I’d suggest making it an alias or even better save as Shell Extension available via hotkey using awesome alfred app.
akka singleton actor
If you ever want to do something like this:
DON’T! NEVER. Even in tests or something, doesn’t matter, never!
Using singleton actor object + scala-specs = silen fail with message “null” and one big WTF.