clojang / lfecljapp

An Example LFE/Clojure Multi-node System using OTP and Supervision Trees
Other
28 stars 2 forks source link

High CPU when stopping the Clojure server #48

Open oubiwann opened 7 years ago

oubiwann commented 7 years ago
  1. Start the clojure REPL
  2. Start the clojure server (managed-server)
  3. Call the stop function (from either the LFE or Clojure API)
  4. Watch the CPU jump to post 100%

It seems that stopping only really works when you run the clojure server from (-main); looks like the core.async loop in (managed-server) isn't written correctly.

oubiwann commented 7 years ago

There's a new core.async release that fixes a related issue (and might well fix the issue underlying this bug).

oubiwann commented 7 years ago

That being said, I think the source of the problem is actually an incorrect placement of a recur inside or outside an if/when block ...