aboutsummaryrefslogtreecommitdiff
path: root/test/optionals.tm
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-01-02 16:24:07 -0500
committerBruce Hill <bruce@bruce-hill.com>2025-01-02 16:24:07 -0500
commitbe384c0caa92cb152c264125fb265373e6a50440 (patch)
treeb823fb0dd4cfec643670236688a2a7ca76787d7b /test/optionals.tm
parent2fcf1939bb295887592c1f24f7b8fbb10efcfcba (diff)
Replace threads with generic mutexed datastructures.
Diffstat (limited to 'test/optionals.tm')
-rw-r--r--test/optionals.tm19
1 files changed, 0 insertions, 19 deletions
diff --git a/test/optionals.tm b/test/optionals.tm
index 5aefedf4..13a8dcae 100644
--- a/test/optionals.tm
+++ b/test/optionals.tm
@@ -61,12 +61,6 @@ func maybe_c_string(should_i:Bool->CString?):
else:
return none
-func maybe_channel(should_i:Bool->|Int|?):
- if should_i:
- return |:Int|?
- else:
- return none
-
func maybe_thread(should_i:Bool->Thread?):
if should_i:
return Thread.new(func(): pass)
@@ -246,19 +240,6 @@ func main():
do:
!! ...
- !! Channels:
- >> yep := maybe_channel(yes)
- # No "=" test here because channels use addresses in the text version
- >> nope := maybe_channel(no)
- = none : |:Int|?
- >> if yep: >> yep
- else: fail("Falsey: $yep")
- >> if nope:
- fail("Truthy: $nope")
- else: !! Falsey: $nope
-
- do:
- !! ...
!! Threads:
>> yep := maybe_thread(yes)
# No "=" test here because threads use addresses in the text version