aboutsummaryrefslogtreecommitdiff
path: root/examples/pthreads
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-04-04 17:06:09 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-04-04 17:06:09 -0400
commit0b8074154e2671691050bdb3bcb33245625a056c (patch)
tree1410e0c4e05c6372e876cd08f16d117e12868f41 /examples/pthreads
parentfadcb45baf1274e06cfe37b87655b9146aa52874 (diff)
First working compile of refactor to add explicit typing to declarations
and support untyped empty collections and `none`s
Diffstat (limited to 'examples/pthreads')
-rw-r--r--examples/pthreads/pthreads.tm2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/pthreads/pthreads.tm b/examples/pthreads/pthreads.tm
index 975b981d..fb79e822 100644
--- a/examples/pthreads/pthreads.tm
+++ b/examples/pthreads/pthreads.tm
@@ -65,7 +65,7 @@ struct pthread_t(; extern, opaque):
func detatch(p:pthread_t): inline C { pthread_detach(_$p); }
struct IntQueue(_queue:@[Int], _mutex:@pthread_mutex_t, _cond:@pthread_cond_t):
- func new(initial=[:Int] -> IntQueue):
+ func new(initial:[Int]=[] -> IntQueue):
return IntQueue(@initial, pthread_mutex_t.new(), pthread_cond_t.new())
func give(q:IntQueue, n:Int):