summaryrefslogtreecommitdiff
path: root/shared_counter.kpl
diff options
context:
space:
mode:
Diffstat (limited to 'shared_counter.kpl')
-rw-r--r--shared_counter.kpl6
1 files changed, 4 insertions, 2 deletions
diff --git a/shared_counter.kpl b/shared_counter.kpl
index 0fdf804..01f01bd 100644
--- a/shared_counter.kpl
+++ b/shared_counter.kpl
@@ -3,7 +3,7 @@
counter : %shared 0
-inc_dec : ([amount]
+inc_dec : ([I64.amount]
header : "#BOLD#Thread: %#, #WHITE#Counter:# " `format `thread_id
body : ^ counter {[c]
c +: amount
@@ -19,11 +19,13 @@ inc_dec : ([amount]
inc : inc_dec `bind 1
dec : inc_dec `bind -1
+Inc_Dec_fn `type dec
+
actions : %const 1_000
batch : %const 100
-runner : ([fn]
+runner : ([Inc_Dec_fn.fn]
total : actions
@ total {
`log "#WHITE#Batch: #CYAN#% #MAGENTA#%#\n" `format (fn; total)