Quantcast
Channel: ReScript Forum - Latest posts
Viewing all articles
Browse latest Browse all 2592

Promise helper name

$
0
0

It might be worth noting that Node has a promise version of setTimeout that can be given an AbortSignal.

I’ve called the Node version setTimeoutAsync and the promise+setTimeout version wait in my ReScript code.

I think something like wait or delay is better than sleep since sleep is normally a blocking operation in languages like Bash or C. For me, “wait” has a more asynchronous meaning.


Viewing all articles
Browse latest Browse all 2592

Trending Articles