teamon

  • Archive
  • RSS
  • Ask me anything

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.

    • #scala
    • #sbt
    • #akka
  • 3 months ago
  • Comments
  • Permalink
  • Share
    Tweet

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.

    • #scala
    • #akka
  • 1 year ago
  • 2
  • Comments
  • Permalink
  • Share
    Tweet

About

Ruby, Scala and others.

Pages

  • About
  • Projects
  • RSS
  • Random
  • Archive
  • Ask me anything
  • Mobile

Effector Theme by Carlo Franco.

Powered by Tumblr