As C# includes classes like Thread
and Mutex
, the C++ Standard Library also provides support for multi-threading. Classes like std::thread
and std::mutex
are very similar, but there are larger differences when it comes to C#’s lock
, async
, and await
keywords. Read on to learn how to write multi-threaded C++!
Posts Tagged async
In today’s final article covering the C++ language, we’ll explore a new C++20 feature: coroutines. These are analogous to both C# iterator functions (i.e. those with yield
) and C# async
functions. There are a lot of interesting aspects of coroutines, so let’s dive in explore!
Today we conclude the series by looking at all the remaining features in C# 7.3 that we get access to in Unity 2018.3. Read on to learn about new kinds of structs, in
parameters, new where
constraints, discards, default
literals, generalized async
returns, and new preprocessor symbols!
Last week’s article tested the performance of the async
and await
keywords plus the C# Task
system against Unity’s new C# jobs system. This week we’ll go in depth with async
and await
to learn how they work, how they relate to the Task
system, and how we can customize them for our own uses.
Unity 2018.1 brought us two asynchronous code systems. First, there’s C# 5’s async
and await
keywords in conjunction with the Task
and Task<T>
types. Second, there’s Unity’s own C# jobs system. There are many differences, but which is faster? Today’s article puts them to the test to find out!