Closed ku1ik closed 7 years ago
Thanks for the PR! A (Thread/wait)
might be a better choice in this case, though.
Hmm, no such thing as (Thread/wait)
, you meant something else?
(.. Thread currentThread join)
?
Ah, sorry, I always forget that wait
works strangely. It's Object.wait
rather than Thread.wait
, and it needs to be called inside a synchronized method and has other annoying conditions.
(.. Thread currentThread join)
is a better solution. Let's go with that.
There you go.
Fixed in 0.9.0
We need to block main thread to prevent system from shutting down immediately after starting.
With default jetty server this (accidentally) isn't a problem as it apparently creates some non-daemon threads. However if you switch to a different server component which doesn't create non-daemon threads the app exits immediately.
(I found this issue after switching to Aleph component)