Skip to content

Commit

Permalink
README: add note on Thread/join
Browse files Browse the repository at this point in the history
  • Loading branch information
Stuart Sierra committed Apr 22, 2016
1 parent cc73e46 commit 8377a48
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,12 @@ Lifecycle `start` method. Then `main` could be as trivial as:
(defn main [] (component/start (new-system)))
```

**Note:** You will still need to keep the main thread of your
application running to prevent the JVM from shutting down. One way is
to block the main thread waiting for some signal to shut down; another
way is to `Thread/join` the main thread to one of your components'
threads.

This also works well in conjunction with command-line drivers such as
[Apache Commons Daemon](http://commons.apache.org/proper/commons-daemon/).

Expand Down

0 comments on commit 8377a48

Please sign in to comment.