Skip to content
Discussion options

You must be logged in to vote

The C# team wanted there to be a very clear delineation for asynchronous boundaries, both because of the overhead of the state machine and because you are likely to switch between threads which can have a direct impact on how your code behaves. Anything thread-affine, like thread locals, locking, etc., effectively break in these cases, and without compiler support and understanding it would be very easy to write code that relies on these features that will not work correctly at runtime.

If you want a different perspective on how async can be implemented in a language you can check out OpenJDK Loom, which aims to bring user-mode threads to the Java language. It does sound enticing but ther…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@BEagle1984
Comment options

Answer selected by BEagle1984
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants