jiulinxiri-Stewed Noodles 资源-第14页
jiulinxiri的头像-Stewed Noodles 资源
超级管理员河南管理员
一拳之石取其了坚,一勺之水取其净!
How to follow this guide 如何遵循本指南-Stewed Noodles 资源

How to follow this guide 如何遵循本指南

This guide is called Swift Concurrency by Example because it focuses on providing as many examples as possible. My goal is to stay laser-focused on real-world problems and real-wor...
What is a synchronous function? 什么是同步函数?-Stewed Noodles 资源

What is a synchronous function? 什么是同步函数?

By default, all Swift functions are synchronous, but what does that mean? A synchronous function is one that executes all its work in a simple, straight line on a single threa...
What is an asynchronous function?什么是异步函数?-Stewed Noodles 资源

What is an asynchronous function?什么是异步函数?

Although Swift functions are synchronous by default, we can make them asynchronous by adding one keyword: async. Inside asynchronous functions, we can call other asy...
How to create and call an async function如何创建和调用异步函数-Stewed Noodles 资源

How to create and call an async function如何创建和调用异步函数

Using async functions in Swift is done in two steps: declaring the function itself as being async, then calling that function using await.在 Swift 中使用异步函数分两步完...
How to call async throwing functions 如何调用异步 throwing 函数-Stewed Noodles 资源

How to call async throwing functions 如何调用异步 throwing 函数

Just like their synchronous counterparts, Swift’s async functions can be throwing or non-throwing depending on how you want them to behave. However, there is a twist: although we ...
What calls the first async function? 什么调用第一个异步函数?-Stewed Noodles 资源

What calls the first async function? 什么调用第一个异步函数?

You can only call async functions from other async functions, because they might need to suspend themselves and everything that is waiting for them. This leads to a bit of a chicke...
What’s the performance cost of calling an async function? 调用 async 函数的性能成本是多少?-Stewed Noodles 资源

What’s the performance cost of calling an async function? 调用 async 函数的性能成本是多少?

Whenever we use await to call an async function, we mark a potential suspension point in our code – we’re acknowledging that it’s entirely possible our function w...
How to create and use async properties 如何创建和使用异步属性-Stewed Noodles 资源

How to create and use async properties 如何创建和使用异步属性

Just as Swift’s functions can be asynchronous, computed properties can also be asynchronous: attempting to access them must also use await or similar, and may also need&...
How to call an async function using async let 如何使用 async let 调用 async 函数-Stewed Noodles 资源

How to call an async function using async let 如何使用 async let 调用 async 函数

Sometimes you want to run several async operations at the same time then wait for their results to come back, and the easiest way to do that is with async let. This lets you start...
Sending data safely across actor boundaries 跨参与者边界安全地发送数据-Stewed Noodles 资源

Sending data safely across actor boundaries 跨参与者边界安全地发送数据

Swift tries to ensure access to shared data is done safely, partly through types such as actors, and partly through a concept of sendability implemented through the ...