tools.nrepl

Agent nesting causes issues

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Blocker Blocker
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: 0.2.0
  • Component/s: None
  • 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 - and then provide a parallel version of send-off. I've spiked a bit on this one, but I'm starting to think a plain queue/thread pool is cleaner.

Thoughts?

Activity

Hide
Chas Emerick added a comment -

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.

Show
Chas Emerick added a comment - 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.
Chas Emerick made changes -
Field Original Value New Value
Priority Major [ 3 ] Blocker [ 1 ]
Fix Version/s 0.2.0 [ 10052 ]
Hide
Colin Jones added a comment -

Great news! Thanks for the quick response.

Show
Colin Jones added a comment - Great news! Thanks for the quick response.
Hide
Chas Emerick added a comment -

Fixed in 0.2.0-beta6.

Show
Chas Emerick added a comment - Fixed in 0.2.0-beta6.
Chas Emerick made changes -
Resolution Completed [ 1 ]
Status Open [ 1 ] Closed [ 6 ]

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: