Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

marking completion of work when sevak completes on new supervised-thr…

…eadpool
  • Loading branch information...
commit 71af6aafbccb4368e20967699fa8f15c01b88fb2 1 parent 575b91b
@amitrathore authored
View
8 src/org/runa/swarmiji/mpi/sevak_proxy.clj
@@ -24,11 +24,11 @@
on-response (fn [msg]
(custom-handler (read-string msg))
(.queueDelete chan return-q-name)
- (.close chan))
+ (.close chan)
+ (mark-completion return-q-name))
f (fn []
- (do
- (send-message-on-queue (queue-sevak-q-name) request-object)
- (on-response (delivery-from chan consumer))))]
+ (send-message-on-queue (queue-sevak-q-name) request-object)
+ (on-response (delivery-from chan consumer)))]
(on-swarmiji-future return-q-name f)
{:channel chan :queue return-q-name :consumer consumer}))
View
10 src/org/runa/swarmiji/mpi/supervised_threadpool.clj
@@ -21,13 +21,9 @@
(defn on-swarmiji-future [return-queue-name thunk]
(let [work (fn []
- (with-swarmiji-bindings
- (log-message "claiming" (.getName (Thread/currentThread)) "for" return-queue-name)
- (claim-thread return-queue-name)
- (thunk)))]
- ;(send (agent nil) work)
- (.submit THREADPOOL work)
-))
+ (claim-thread return-queue-name)
+ (thunk))]
+ (.submit THREADPOOL work)))
(defn preempt-swarmiji-future [[rqn {:keys [thread]}]]
(.interrupt thread)
Please sign in to comment.
Something went wrong with that request. Please try again.