Questions tagged [async]
For questions about the implementation of asynchronous functions or methods in a programming language, including syntax and functionality.
10 questions
3
votes
3
answers
337
views
Is there something better than async in order to avoid dead or unused processing times in single thread?
I recently read about PHP's true async RFC.
The initial real life "picture" (unrelated to PHP or sync processing) that I imagined was a waiter in a restaurant. He/She/It works async, taking ...
1
vote
1
answer
352
views
Alternatives for stackless async I/O implementation?
I find it interesting to have stackless asynchronous I/O, e.g. when using an HTTP-client in the code, the call-stack get emptied before handling next "event" (could be unrelated or the ...
18
votes
2
answers
4k
views
What does it mean that a language has an "effect system"?
I struggle to get the thing about "algebraic effect systems". What is it really about? Is it mostly about that functions doing IO (e.g. http request) should have that IO-operation visible in ...
14
votes
1
answer
3k
views
Async Implementation
I have recently been making my own programming language and I am finding most concepts easy to understand, however I'm not sure how to implement async/await in my language.
ATM, I'm using C# to create ...
16
votes
5
answers
5k
views
Why can many languages' futures not be canceled?
I noticed that many languages' built-in asynchronous Future cannot be canceled once called.
Although many third-party libraries provide this ability, it is not ...
3
votes
2
answers
269
views
Can I use monadic types without needing colored functions?
The inspiration for this question
There are many advantages of using monadic types like Promise<T> or Result<T> as ...
5
votes
1
answer
439
views
Built-In Asynchronous Loops (Not Functions) - Do they / could they exist?
When writing a game's event loop, I always rely on a function from an external library, like draw() in ProcessingJS for ...
8
votes
1
answer
346
views
How can task-local variables be implemented?
In some languages, async/await can be simply transformed into callbacks, as if it were syntactical sugar:
...
7
votes
2
answers
502
views
Must async functions always be marked as such?
In a lot of modern languages (such as Python), asynchronous functions (those that return coroutines) must be explicitly marked as such:
...
8
votes
8
answers
1k
views
What are some options for syntax for async/await?
Some languages, such as JS and Rust, make a distinction between normal/synchronous functions and async ones. An async function ...