Skip to content

Latest commit

 

History

History
26 lines (22 loc) · 1.44 KB

README.md

File metadata and controls

26 lines (22 loc) · 1.44 KB

producer-consumer-workflow

This is a simple experiment to test the concurrent processing using clojure.core.async channel.

                                                  +-----------+
                                        +-------> | Processor | +------+
                                        |         +-----------+        |
                                        |         +-----------+        |
                                        +-------> | Processor | +------+
+----------+                            |         +-----------+        |                            +----------+
| Producer |      +----------------+    |         +-----------+        |    +----------------+      | Consumer |
|          | ---> | input channel  | +----------> | Processor | +---------> | output channel | ---> |          |
+----------+      +----------------+    |         +-----------+        |    +----------------+      +----------+
                                        |         +-----------+        |
                                        +-------> | Processor | +------+
                                        |         +-----------+        |
                                        |         +-----------+        |
                                        +-------> | Processor | +------+
                                                  +-----------+

How to run

$ lein repl
$ (-main [number_of_thread] [number_of_item_to_be_processed])