[NREPL-17] Agent nesting causes issues Created: 13/Apr/12 Updated: 16/Apr/12 Resolved: 16/Apr/12 |
|
| Status: | Closed |
| Project: | tools.nrepl |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 0.2.0 |
| Type: | Defect | Priority: | Blocker |
| Reporter: | Colin Jones | Assignee: | Chas Emerick |
| Resolution: | Completed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
We talked about this briefly on IRC/github: https://github.com/overtone/overtone/issues/85. I guess the nicest way to fix it would be to stop using agents in nREPL. There's only one spot where agents are created, and a few send-off calls (no sends), all internal, so any solution will be non-intrusive from an API perspective. One implementation idea is to use a simple blocking queue and thread pool in java-land. Another is to use nearly the same implementation as Agent, but remove the nesting restriction (call it NestableAgent?). Also get rid of the STM interaction and validator business since those aren't available outside the clojure.lang package Thoughts? |
| Comments |
| Comment by Chas Emerick [ 13/Apr/12 5:18 AM ] |
|
Yes, I started working on this yesterday. Agents have definitely proven themselves unsuitable here, and a poor choice. I'm not going to be fancy; we don't need fancy here. |
| Comment by Colin Jones [ 13/Apr/12 5:49 AM ] |
|
Great news! Thanks for the quick response. |
| Comment by Chas Emerick [ 16/Apr/12 3:08 PM ] |
|
Fixed in 0.2.0-beta6. |