- Sort Score
- Result 10 results
- Languages All
Results 91 - 100 of 129 for coroutines (0.08 sec)
-
docs/zh/docs/async.md
## 协程 **协程**只是 `async def` 函数返回的一个非常奇特的东西的称呼。Python 知道它有点像一个函数,它可以启动,也会在某个时刻结束,而且它可能会在内部暂停 ⏸ ,只要内部有一个 `await`。 通过使用 `async` 和 `await` 的异步代码的所有功能大多数被概括为"协程"。它可以与 Go 的主要关键特性 "Goroutines" 相媲美。 ## 结论 让我们再来回顾下上文所说的: > Python 的现代版本可以通过使用 `async` 和 `await` 语法创建**协程**,并用于支持**异步代码**。 现在应该能明白其含义了。✨ 所有这些使得 FastAPI(通过 Starlette)如此强大,也是它拥有如此令人印象深刻的性能的原因。 ## 非常技术性的细节
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Aug 06 04:48:30 UTC 2024 - 21.1K bytes - Viewed (0) -
internal/ringbuffer/ring_buffer_test.go
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed May 15 00:11:04 UTC 2024 - 26.8K bytes - Viewed (0) -
internal/grid/grid_test.go
go func() { select { case <-cc: return case <-c: buf := make([]byte, 1<<20) stacklen := runtime.Stack(buf, true) fmt.Printf("=== Timeout, assuming deadlock ===\n*** goroutine dump...\n%s\n*** end\n", string(buf[:stacklen])) os.Exit(2) } }() return func() { close(cc) } } func assertNoActive(t *testing.T, c *Connection) { t.Helper()
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jul 29 18:10:04 UTC 2024 - 36.4K bytes - Viewed (0) -
cmd/storage-rest-server.go
globalLocalSetDrives[endpoint.PoolIdx][endpoint.SetIdx][endpoint.DiskIdx] = storage return true } if createStorage(endpoint) { continue } // Start async goroutine to create storage. go func(endpoint Endpoint) { for { time.Sleep(3 * time.Second) if createStorage(endpoint) { return } } }(endpoint) } }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Aug 14 17:11:51 UTC 2024 - 45.7K bytes - Viewed (0) -
cmd/erasure-server-pool-decom.go
if err != nil { decomLogIf(ctx, fmt.Errorf("invalid workers value err: %v, defaulting to %d", err, len(pool.sets))) workerSize = len(pool.sets) } // Each decom worker needs one List() goroutine/worker // add that many extra workers. workerSize += len(pool.sets) wk, err := workers.New(workerSize) if err != nil { return err } var vc *versioning.Versioning
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Sep 06 13:20:19 UTC 2024 - 42.2K bytes - Viewed (0) -
cmd/erasure-server-pool.go
g.Go(func() error { // Get the set where it would be placed. storageInfos[index] = getDiskInfos(ctx, pool.getHashedSet(object).getDisks()...) return nil }, index) } // Wait for the go routines. g.Wait() for i, zinfo := range storageInfos { if zinfo == nil { serverPools[i] = poolAvailableSpace{Index: i} continue } var available uint64 if !isMinioMetaBucketName(bucket) {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Sep 29 22:40:36 UTC 2024 - 89.8K bytes - Viewed (0) -
cmd/erasure-multipart.go
return nil }) }) readDirFn(pathJoin(drivePath, minioMetaTmpBucket), func(tmpDir string, typ os.FileMode) error { if strings.HasPrefix(tmpDir, ".trash") { // do not remove .trash/ here, it has its own routines return nil } vi, err := disk.StatVol(ctx, pathJoin(minioMetaTmpBucket, tmpDir)) if err != nil { return nil } w := xioutil.NewDeadlineWorker(globalDriveConfig.GetMaxTimeout())
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Sep 29 22:40:36 UTC 2024 - 44.7K bytes - Viewed (0) -
CHANGELOG/CHANGELOG-1.2.md
* Version-guard Kubectl client Guestbook application test against deployments ([#24478](https://github.com/kubernetes/kubernetes/pull/24478), [@ihmccreery](https://github.com/ihmccreery)) * Fix goroutine leak in ssh-tunnel healthcheck. ([#24487](https://github.com/kubernetes/kubernetes/pull/24487), [@cjcullen](https://github.com/cjcullen))
Registered: Fri Nov 01 09:05:11 UTC 2024 - Last Modified: Fri Dec 04 06:36:19 UTC 2020 - 41.4K bytes - Viewed (0) -
guava/src/com/google/common/base/CharMatcher.java
void setBits(BitSet table) { for (int c = Character.MAX_VALUE; c >= Character.MIN_VALUE; c--) { if (matches((char) c)) { table.set(c); } } } // Text processing routines /** * Returns {@code true} if a character sequence contains at least one matching BMP character. * Equivalent to {@code !matchesNoneOf(sequence)}. *
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 17 13:00:28 UTC 2024 - 53.9K bytes - Viewed (0) -
internal/grid/connection.go
defer func() { if rec := recover(); rec != nil { gridLogIf(ctx, fmt.Errorf("handleMessages: panic recovered: %v", rec)) debug.PrintStack() } if debugPrint { fmt.Println("handleMessages: write goroutine exited") } cancel(ErrDisconnected) c.connChange.L.Lock() if atomic.CompareAndSwapUint32((*uint32)(&c.state), StateConnected, StateConnectionError) { c.connChange.Broadcast() }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jul 29 18:10:04 UTC 2024 - 46.7K bytes - Viewed (0)