for await…of for await…of 前面介绍过,for...of 循环用于遍历同步的 Iterator 接口。新引入的for await...of 循环,则是用于遍历异步的 Iterator 接口。 async function f () { for await ( const x of createAsyn...
Connection.prototype.transaction() Parameters Returns: Example: Connection.prototype.transaction() Parameters fn «Function» Function to execute in a transaction [optio...
Data Fetching useAsyncData Example useLazyAsyncData Example useFetch Example useLazyFetch Example Refreshing Data refreshNuxtData Example Isomorphic fetch and $fetch Exa...
Testing Writing tests Async functions Test steps Nested test steps Running tests Filtering Command line filtering Test definition filtering Filtering out (Ignoring these test...
Getting Started Install Your first server Your first plugin Loading order of your plugins Validate your data Serialize your data Extend your server Test your server Run you...
Latency Breakdown General SQL layer Read queries Point get Batch point get Table scan & Index scan Index look up Write queries Lock-time point get Lock-time batch point get ...
Shared state Strategies Add bytes dependency Initialize the HashMap On using std::sync::Mutex Update process() Tasks, threads, and contention Holding a MutexGuard acros...
Create the channel Create the channel In the main function, an mpsc channel is created. use tokio :: sync :: mpsc ; #[tokio::main] async fn main () { // Crea...