Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 934 Bytes

apple-passing.asciidoc

File metadata and controls

26 lines (18 loc) · 934 Bytes

What’s this?

As depicted in

Apple Passing Architecture

Apple Passing is the trditional Producer-Consumer question, we have 3 kinds thread group and 2 kinds threshold, Producer Threads add Apple entity to appleQueue, Marker Threads get Apple from appleQueue and add a unique mark reconstruct a new Entity MarkedApple then add new Entity to markedAppleQueue, Consumer Threads consume MarkedApple from markedAppleQueue, note that appleQueue and markedAppleQueu treated as threshold.

How to run?

We can run ApplePassing from source code via following steps:

  • build and copy dependency jar

mvn clean dependency:copy-dependencies install
  • Start ApplePassing

java -cp applePassing-1.0.jar:log4j-1.2.16.jar com.kylin.applepassing.Main -h
  • Stop ApplePassing

Any time, entry exit,quit,q! will stop ApplePassing