Created
August 16, 2014 14:01
-
-
Save SeanTAllen/c61d1b1431169cefaad7 to your computer and use it in GitHub Desktop.
What exactly is going on here?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn mk-executor-transfer-fn [batch-transfer->worker] | |
(fn this | |
([task tuple block? ^List overflow-buffer] | |
(if (and overflow-buffer (not (.isEmpty overflow-buffer))) | |
(.add overflow-buffer [task tuple]) | |
(try-cause | |
(disruptor/publish batch-transfer->worker [task tuple] block?) | |
(catch InsufficientCapacityException e | |
(if overflow-buffer | |
(.add overflow-buffer [task tuple]) | |
(throw e)) | |
)))) | |
([task tuple overflow-buffer] | |
(this task tuple (nil? overflow-buffer) overflow-buffer)) | |
([task tuple] | |
(this task tuple nil) | |
))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment