Agent exception handlers

Read this first!

Clojure issue tracking now lives at http://dev.clojure.org/jira, and the wiki is at http://dev.clojure.org. These Assembla pages are kept online for historical interest only.

 


 

This is an issues list for agent error handlers. It is not a promise of any feature.  See also ticket #30.

Background

Since agents run their actions asynchronously on thread pool threads, there isn't a direct path from a thrown exception back to the sender of the action, unlike all of the other reference types where the initiator is on the stack. So any exceptions must be caught in the thread pool thread and put somewhere. Currently that place is in the agent itself. Agent exception handlers will provide a hook for that exception to go somewhere else. They might additionally provide other features.

 

The original idea behind a synch handler function was that it could put the error on a queue if desired. The only complexity with an arbitrary synch handler function are:

 

The Plan: