Posts Tagged asynchronous

What are Your Latency Requirements?

Tags: , ,

Unity’s Mike Acton gave a talk this week at GDC titled Everyone watching this is fired. One point he made was regarding the importance of knowing the latency requirements of our code. When does the result need to be ready? Today we’ll talk about the ramifications of answering that question with anything other than “not immediately” and see how that can lead to better code.

Read the rest of this article »

2 Comments

C# Tasks vs. Unity Jobs

Tags: , , ,

Two weeks ago we tested the performance of the async and await keywords plus the C# Task system against Unity’s new C# jobs system. This tested the usual combination of async and await with the Task system, but didn’t test the Task system directly against Unity’s C# jobs system. Today we’ll test that and, in so doing, see how to use the Task system without the async and await keywords.

Read the rest of this article »

11 Comments

C# 6 in IL2CPP

Tags: , , ,

Unity 2018.1 was released last week and with it comes support for C# 6. Today we’ll take a look at the C++ that IL2CPP generates when we use the new features in C# 6. Warning: one of them is buggy and shouldn’t be used.

Read the rest of this article »

2 Comments

Getting the Result of an Iterator

Tags: , , ,

Iterators (functions that yield) are great for representing asynchronous processes such as web calls, updating state over time, and multi-step operations. One unfortunate downside is that it’s tough to return a result from them. Today’s article explores several workarounds to this problem before ultimately arriving at a clean, easy-to-use solution to the problem. Read on to learn how to make iterators more useful!

Read the rest of this article »

No Comments