Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 211 - 220 of 285 for workers (0.08 seconds)

  1. docs/zh-hant/docs/advanced/stream-data.md

    而且在許多情況下,讀取它們會是阻塞操作(可能阻塞事件迴圈),因為資料是從磁碟或網路讀取。
    
    /// info
    
    上面的範例其實是例外,因為 `io.BytesIO` 物件已在記憶體中,讀取不會阻塞任何東西。
    
    但在多數情況下,讀取檔案或類檔案物件會造成阻塞。
    
    ///
    
    為了避免阻塞事件迴圈,你可以將路徑操作函式宣告為一般的 `def`(而非 `async def`),這樣 FastAPI 會在 threadpool worker 上執行它,避免阻塞主事件迴圈。
    
    {* ../../docs_src/stream_data/tutorial002_py310.py ln[30:34] hl[31] *}
    
    /// tip
    
    如果你需要在 async 函式內呼叫阻塞程式碼,或在阻塞函式中呼叫 async 函式,你可以使用 [Asyncer](https://asyncer.tiangolo.com),它是 FastAPI 的姊妹函式庫。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:33:04 GMT 2026
    - 4.9K bytes
    - Click Count (0)
  2. cmd/namespace-lock_test.go

    		// Unlock the 1st lock; ref=1 after this line
    		nsLk.unlock("volume", "path", false)
    
    		// Taking another lockMapMutex here allows queuing up additional lockers. This should
    		// not be required but makes reproduction much easier.
    		nsLk.lockMapMutex.Lock()
    
    		// lk3 blocks.
    		lk3ch := make(chan bool)
    		go func() {
    Created: Sun Apr 05 19:28:12 GMT 2026
    - Last Modified: Fri Aug 29 02:39:48 GMT 2025
    - 3K bytes
    - Click Count (0)
  3. guava/src/com/google/common/collect/LinkedHashMultiset.java

    import java.io.ObjectOutputStream;
    import java.util.LinkedHashMap;
    import org.jspecify.annotations.Nullable;
    
    /**
     * A {@code Multiset} implementation with predictable iteration order. Its iterator orders elements
     * according to when the first occurrence of the element was added. When the multiset contains
     * multiple instances of an element, those instances are consecutive in the iteration order. If all
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Fri Dec 05 23:15:58 GMT 2025
    - 3.8K bytes
    - Click Count (0)
  4. guava/src/com/google/common/collect/Comparators.java

        return least(k, comparator.reversed());
      }
    
      /**
       * Returns a comparator of {@link Optional} values which treats {@link Optional#empty} as less
       * than all other values, and orders the rest using {@code valueComparator} on the contained
       * value.
       *
       * @since 22.0 (but only since 33.4.0 in the Android flavor)
       */
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Feb 23 19:19:10 GMT 2026
    - 10.9K bytes
    - Click Count (0)
  5. docs/en/docs/advanced/stream-data.md

    ///
    
    To avoid blocking the event loop, you can simply declare the *path operation function* with regular `def` instead of `async def`, that way FastAPI will run it on a threadpool worker, to avoid blocking the main loop.
    
    {* ../../docs_src/stream_data/tutorial002_py310.py ln[30:34] hl[31] *}
    
    /// tip
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 5.4K bytes
    - Click Count (0)
  6. docs/pt/docs/advanced/stream-data.md

    ///
    
    Para evitar bloquear o loop de eventos, você pode simplesmente declarar a função de operação de rota com `def` normal em vez de `async def`. Assim, o FastAPI a executará em um worker de threadpool, evitando bloquear o loop principal.
    
    {* ../../docs_src/stream_data/tutorial002_py310.py ln[30:34] hl[31] *}
    
    /// tip | Dica
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:20:13 GMT 2026
    - 5.7K bytes
    - Click Count (0)
  7. cmd/data-usage-utils.go

    	// Objects total count across all buckets
    	ObjectsTotalCount uint64 `json:"objectsCount"`
    
    	// Versions total count across all buckets
    	VersionsTotalCount uint64 `json:"versionsCount"`
    
    	// Delete markers total count across all buckets
    	DeleteMarkersTotalCount uint64 `json:"deleteMarkersCount"`
    
    	// Objects total size across all buckets
    	ObjectsTotalSize uint64                           `json:"objectsTotalSize"`
    Created: Sun Apr 05 19:28:12 GMT 2026
    - Last Modified: Sun Mar 10 09:15:15 GMT 2024
    - 6.4K bytes
    - Click Count (0)
  8. docs/fr/docs/advanced/stream-data.md

    ///
    
    Pour éviter de bloquer la boucle d'événements, vous pouvez simplement déclarer la *fonction de chemin d'accès* avec un `def` classique au lieu de `async def`. Ainsi, FastAPI l'exécutera dans un worker de pool de threads, afin d'éviter de bloquer la boucle principale.
    
    {* ../../docs_src/stream_data/tutorial002_py310.py ln[30:34] hl[31] *}
    
    /// tip | Astuce
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:33:45 GMT 2026
    - 6.2K bytes
    - Click Count (0)
  9. build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/precommit/ForbiddenPatternsTask.java

        }
    
        @OutputFile
        public File getOutputMarker() {
            return new File(projectLayout.getBuildDirectory().getAsFile().get(), "markers/" + getName());
        }
    
        @Input
        public Map<String, String> getPatterns() {
            return Collections.unmodifiableMap(patterns);
        }
    
        public void exclude(String... excludes) {
    Created: Wed Apr 08 16:19:15 GMT 2026
    - Last Modified: Tue Jun 01 09:19:30 GMT 2021
    - 6.8K bytes
    - Click Count (0)
  10. internal/dsync/drwmutex.go

    func (dm *DRWMutex) lockBlocking(ctx context.Context, lockLossCallback func(), id, source string, isReadLock bool, opts Options) (locked bool) {
    	restClnts, _ := dm.clnt.GetLockers()
    
    	// Create lock array to capture the successful lockers
    	locks := make([]string, len(restClnts))
    
    	// Add total timeout
    	ctx, cancel := context.WithTimeout(ctx, opts.Timeout)
    	defer cancel()
    
    	// Tolerance is not set, defaults to half of the locker clients.
    Created: Sun Apr 05 19:28:12 GMT 2026
    - Last Modified: Fri Aug 29 02:39:48 GMT 2025
    - 20.3K bytes
    - Click Count (0)
Back to Top