Search Options

Results per page
Sort
Preferred Languages
Advance

Results 361 - 370 of 567 for nwait (0.02 sec)

  1. cmd/bootstrap-peer-server.go

    					} else {
    						offlineEndpoints = append(offlineEndpoints, fmt.Errorf("%s is unreachable: %w", clnt, err))
    					}
    				} else {
    					onlineServers++
    				}
    				mu.Unlock()
    			}(clnt)
    		}
    		wg.Wait()
    
    		select {
    		case <-ctx.Done():
    			return ctx.Err()
    		default:
    			// Sleep and stagger to avoid blocked CPU and thundering
    			// herd upon start up sequence.
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Oct 01 22:13:18 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/util/concurrent/GeneratedMonitorTest.java

      }
    
      /** A typical timeout value we'll use in the tests. */
      private static final long SMALL_TIMEOUT_MILLIS = 10;
    
      /** How long to wait when determining that a thread is blocked if we expect it to be blocked. */
      private static final long EXPECTED_HANG_DELAY_MILLIS = 75;
    
      /**
       * How long to wait when determining that a thread is blocked if we DON'T expect it to be blocked.
       */
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:18:12 UTC 2024
    - 27.1K bytes
    - Viewed (0)
  3. README.md

    def read_item(item_id: int, q: Union[str, None] = None):
        return {"item_id": item_id, "q": q}
    ```
    
    <details markdown="1">
    <summary>Or use <code>async def</code>...</summary>
    
    If your code uses `async` / `await`, use `async def`:
    
    ```Python hl_lines="9  14"
    from typing import Union
    
    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/")
    async def read_root():
        return {"Hello": "World"}
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Oct 31 09:13:26 UTC 2024
    - 23.6K bytes
    - Viewed (0)
  4. src/cmd/asm/internal/asm/endtoend_test.go

    		for len(output) > 0 && (output[0] < want || output[0] != want && len(output[0]) >= 5 && output[0][:5] == want[:5]) {
    			if len(output[0]) >= 5 && output[0][:5] == want[:5] {
    				t.Errorf("mismatched output:\nhave %s\nwant %s", output[0], want)
    				output = output[1:]
    				continue Diff
    			}
    			t.Errorf("unexpected output: %q", output[0])
    			output = output[1:]
    		}
    		if len(output) > 0 && output[0] == want {
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Thu Dec 07 18:42:59 UTC 2023
    - 11.6K bytes
    - Viewed (0)
  5. docs/zh/docs/advanced/custom-response.md

    包括许多与云存储,视频处理等交互的库。
    
    ```Python hl_lines="2  10-12  14"
    {!../../docs_src/custom_response/tutorial008.py!}
    ```
    
    /// tip | "小贴士"
    
    注意在这里,因为我们使用的是不支持 `async` 和 `await` 的标准 `open()`,我们使用普通的 `def` 声明了路径操作。
    
    ///
    
    ### `FileResponse`
    
    异步传输文件作为响应。
    
    与其他响应类型相比,接受不同的参数集进行实例化:
    
    * `path` - 要流式传输的文件的文件路径。
    * `headers` - 任何自定义响应头,传入字典类型。
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 7.7K bytes
    - Viewed (0)
  6. docs/ja/docs/index.md

    @app.get("/items/{item_id}")
    def read_item(item_id: int, q: str = None):
        return {"item_id": item_id, "q": q}
    ```
    
    <details markdown="1">
    <summary>または<code>async def</code>を使います...</summary>
    
    `async` / `await`を使用するときは、 `async def`を使います:
    
    ```Python hl_lines="7 12"
    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/")
    async def read_root():
        return {"Hello": "World"}
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 20 19:20:23 UTC 2024
    - 21K bytes
    - Viewed (0)
  7. docs/en/docs/advanced/generate-clients.md

    **reflected** on the client code automatically. And if you **build** the client it will error out if you have any **mismatch** in the data used.
    
    So, you would **detect many errors** very early in the development cycle instead of having to wait for the errors to show up to your final users in production and then trying to debug where the problem is. ✨...
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 10.7K bytes
    - Viewed (0)
  8. internal/lock/lock_windows.go

    }
    
    // TryLockedOpenFile - tries a new write lock, functionality
    // it is similar to LockedOpenFile with with syscall.LOCK_EX
    // mode but along with syscall.LOCK_NB such that the function
    // doesn't wait forever but instead returns if it cannot
    // acquire a write lock.
    func TryLockedOpenFile(path string, flag int, perm os.FileMode) (*LockedFile, error) {
    	var lockType uint32 = lockFileFailImmediately | lockFileExclusiveLock
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Oct 18 18:08:15 UTC 2023
    - 7.9K bytes
    - Viewed (0)
  9. docs/pt/docs/tutorial/dependencies/index.md

    Não faz diferença. O **FastAPI** sabe o que fazer.
    
    /// note | "Nota"
    
    Caso você não conheça, veja em [Async: *"Com Pressa?"*](../../async.md#com-pressa){.internal-link target=_blank} a sessão acerca de `async` e `await` na documentação.
    
    ///
    
    ## Integrando com OpenAPI
    
    Todas as declarações de requisições, validações e requisitos para suas dependências (e sub-dependências) serão integradas em um mesmo esquema OpenAPI.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 12.6K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/cache2/Relay.kt

                if (sourcePos != upstreamPos) break
    
                // No more data upstream. We're done.
                if (complete) return -1L
    
                // Another thread is already reading. Wait for that.
                if (upstreamReader != null) {
                  timeout.waitUntilNotified(this@Relay)
                  continue
                }
    
                // We will do the read.
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 11.8K bytes
    - Viewed (0)
Back to top