From 99a9b9a2b6164d9fa7c954b2d974b837c1e42505 Mon Sep 17 00:00:00 2001 From: Sage Vaillancourt Date: Wed, 6 Apr 2022 00:05:30 -0400 Subject: [PATCH] Make threading tests more brief. --- src/threads.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/threads.h b/src/threads.h index 8d5ce3b..22de236 100644 --- a/src/threads.h +++ b/src/threads.h @@ -12,13 +12,14 @@ void cleanPromise(struct Promise* promise); int isDone(struct Promise* promise); fn(async, "async", - "Run the given lambda on a separate thread.", - "(def sleepy (fn () ((sys \"sleep 0.1\") \"Hiya\"))) (def x (async sleepy)) x", "", - "(def sleepy (fn () ((sys \"sleep 0.1\") \"Hiya\"))) (def x (async sleepy)) (await x)", "Hiya", + "Run the given lambda on a separate thread, returning a promise.", + "(def sleepy (fn () ((sys \"sleep 0.01\") \"Hiya\"))) (def x (async sleepy)) x", "", + "(def sleepy (fn () ((sys \"sleep 0.01\") \"Hiya\"))) (def x (async sleepy)) (await x)", "Hiya", ); fn(await, "await", - "" + "Waits for a promise to resolve before proceeding.", + "(def sleepy (fn () ((sys \"sleep 0.01\") \"Hiya\"))) (def x (async sleepy)) (await x)", "Hiya", ); #endif // PEBBLISP_THREADS_H