Showing results for Async - Developer Support

May 15, 2020
Post comments count0
Post likes count0

Resolved JavaScript Promises Can Be Used Multiple Times!

Developer Support
Developer Support

JavaScript Promises are powerful, and they become more powerful once we understand that a "resolved" Promise can be used more than once!

PremierJavaScriptasync
Oct 1, 2018
Post comments count2
Post likes count0

The danger of TaskCompletionSource class

Sergey Tepliakov
Sergey Tepliakov

... when used with async/await. TaskCompletionSource class is a very useful facility if you want to control the lifetime of a task manually. I share a canonical example when TaskCompletionSource is used for converting the event-based asynchronous code to the Task-based pattern.

seteplia
Sep 5, 2018
Post comments count0
Post likes count0

Combining iterator blocks and async methods in C#

Sergey Tepliakov
Sergey Tepliakov

One of the best traits of a well-designed system is composability. Large systems are complex and hierarchical and one of the best ways to fight accidental complexity is to compose a system from smaller components. You write and test each component independently then you glue them together to achieve a higher-level behavior. Programming languages...

seteplia
Feb 14, 2018
Post comments count0
Post likes count1

One user scenario to rule them all

Sergey Tepliakov
Sergey Tepliakov

The async series Almost every non-trivial behavior of the async methods in C# can be explained based on one user scenario: migration of the existing synchronous code to asynchronous should be as simple as possible. You should be able to add keyword before a method's return type, add suffix to its name, add keyword here and t...

seteplia
Feb 6, 2016
Post comments count0
Post likes count0

TaskSchedulers and semaphores

Andrew Arnott
Andrew Arnott

When you write multi-threaded code, it's important to be aware of whether the code in other libraries you call into is also thread-safe. By my observation, most code written is not thread-safe. So if you're writing thread-safe code, kudos to you. But as you'll sometimes need to call non-thread-safe code from your multi-threaded code, this post pres...

andarno