Add lld-parking-lot module: thread-safe parking lot with Strategy, Observer and CAS-based spot claiming, 10 tests incl. 64-thread race
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
== 1. entering and leaving ==
|
||||
board: {SMALL=1, MEDIUM=2, LARGE=1}
|
||||
board: {SMALL=1, MEDIUM=1, LARGE=1}
|
||||
board: {SMALL=1, MEDIUM=1, LARGE=0}
|
||||
bike -> F0-1, car -> F0-2, truck -> F0-3
|
||||
board: {SMALL=1, MEDIUM=2, LARGE=0}
|
||||
car stayed 130 min, fee = 60
|
||||
|
||||
== 2. failures ==
|
||||
second MH03-TRK : MH03-TRK is already inside the lot
|
||||
another truck : no free spot for TRUCK MH04-TRK
|
||||
reused ticket : unknown or already used ticket T-2
|
||||
|
||||
== 3. the strategy decides where the motorcycle goes ==
|
||||
NearestFirstStrategy puts a motorcycle in F0-1
|
||||
BestFitStrategy puts a motorcycle in F1-1
|
||||
Reference in New Issue
Block a user