Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 1,100 for yield (0.02 sec)

  1. okhttp-testing-support/src/main/kotlin/okhttp3/internal/concurrent/TaskFaker.kt

              taskRunner: TaskRunner,
              nanos: Long,
            ) {
              taskRunner.assertThreadHoldsLock()
              check(waitingCoordinatorTask == null)
              if (nanos == 0L) return
    
              // Yield until notified, interrupted, or the duration elapses.
              val waitUntil = nanoTime + nanos
              val self = currentTask
              waitingCoordinatorTask = self
              waitingCoordinatorNotified = false
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Apr 29 00:33:04 UTC 2024
    - 12.6K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_events/test_tutorial001.py

    from fastapi.testclient import TestClient
    
    
    @pytest.fixture(name="app", scope="module")
    def get_app():
        with pytest.warns(DeprecationWarning):
            from docs_src.events.tutorial001 import app
        yield app
    
    
    def test_events(app: FastAPI):
        with TestClient(app) as client:
            response = client.get("/items/foo")
            assert response.status_code == 200, response.text
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Oct 18 12:36:40 UTC 2023
    - 3.6K bytes
    - Viewed (0)
  3. docs_src/sql_databases/tutorial002_an_py39.py

    from fastapi import Depends, FastAPI, HTTPException, Query
    from sqlmodel import Field, Session, SQLModel, create_engine, select
    
    
    class HeroBase(SQLModel):
        name: str = Field(index=True)
        age: Union[int, None] = Field(default=None, index=True)
    
    
    class Hero(HeroBase, table=True):
        id: Union[int, None] = Field(default=None, primary_key=True)
        secret_name: str
    
    
    class HeroPublic(HeroBase):
        id: int
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Oct 09 19:44:42 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_custom_docs_ui/test_tutorial001.py

        static_dir: Path = Path(os.getcwd()) / "static"
        print(static_dir)
        static_dir.mkdir(exist_ok=True)
        from docs_src.custom_docs_ui.tutorial001 import app
    
        with TestClient(app) as client:
            yield client
        static_dir.rmdir()
    
    
    def test_swagger_ui_html(client: TestClient):
        response = client.get("/docs")
        assert response.status_code == 200, response.text
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu May 23 22:59:02 UTC 2024
    - 1.3K bytes
    - Viewed (0)
  5. docs/en/docs/advanced/custom-response.md

    1. This is the generator function. It's a "generator function" because it contains `yield` statements inside.
    2. By using a `with` block, we make sure that the file-like object is closed after the generator function is done. So, after it finishes sending the response.
    3. This `yield from` tells the function to iterate over that thing named `file_like`. And then, for each part iterated, yield that part as coming from this generator function (`iterfile`).
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 12K bytes
    - Viewed (0)
  6. docs/em/docs/advanced/custom-response.md

    ```{ .python .annotate hl_lines="2  10-12  14" }
    {!../../docs_src/custom_response/tutorial008.py!}
    ```
    
    1๏ธโƒฃ. ๐Ÿ‘‰ ๐Ÿš‚ ๐Ÿ”ข. โšซ๏ธ "๐Ÿš‚ ๐Ÿ”ข" โ†ฉ๏ธ โšซ๏ธ ๐Ÿ”Œ `yield` ๐Ÿ“„ ๐Ÿ”˜.
    2๏ธโƒฃ. โš™๏ธ `with` ๐Ÿซ, ๐Ÿ‘ฅ โš’ ๐Ÿ’ญ ๐Ÿ‘ˆ ๐Ÿ“-๐Ÿ’– ๐ŸŽš ๐Ÿ“ช โฎ๏ธ ๐Ÿš‚ ๐Ÿ”ข ๐Ÿ”จ. , โฎ๏ธ โšซ๏ธ ๐Ÿ ๐Ÿ“จ ๐Ÿ“จ.
    3๏ธโƒฃ. ๐Ÿ‘‰ `yield from` ๐Ÿ’ฌ ๐Ÿ”ข ๐Ÿ” ๐Ÿคญ ๐Ÿ‘ˆ ๐Ÿ‘œ ๐ŸŒŸ `file_like`. & โคด๏ธ, ๐Ÿ”  ๐Ÿ• ๐Ÿ”, ๐ŸŒพ ๐Ÿ‘ˆ ๐Ÿ• ๐Ÿ‘Ÿ โšช๏ธโžก๏ธ ๐Ÿ‘‰ ๐Ÿš‚ ๐Ÿ”ข.
    
        , โšซ๏ธ ๐Ÿš‚ ๐Ÿ”ข ๐Ÿ‘ˆ ๐Ÿ“จ "๐Ÿญ" ๐Ÿ‘ท ๐Ÿ•ณ ๐Ÿ™† ๐Ÿ”˜.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 9.7K bytes
    - Viewed (0)
  7. docs/en/docs/tutorial/middleware.md

    * It can do something to that **response** or run any needed code.
    * Then it returns the **response**.
    
    /// note | "Technical Details"
    
    If you have dependencies with `yield`, the exit code will run *after* the middleware.
    
    If there were any background tasks (documented later), they will run *after* all the middleware.
    
    ///
    
    ## Create a middleware
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/base/SuppliersTest.java

                            "timed out waiting for other threads to block"
                                + " synchronizing on supplier"));
                    break;
                  }
                  Thread.yield();
                }
                count.getAndIncrement();
                return Boolean.TRUE;
              }
            };
    
        final Supplier<Boolean> memoizedSupplier = memoizer.apply(supplier);
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 17.9K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/base/SuppliersTest.java

                            "timed out waiting for other threads to block"
                                + " synchronizing on supplier"));
                    break;
                  }
                  Thread.yield();
                }
                count.getAndIncrement();
                return Boolean.TRUE;
              }
            };
    
        final Supplier<Boolean> memoizedSupplier = memoizer.apply(supplier);
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 17.9K bytes
    - Viewed (0)
  10. docs/em/docs/tutorial/middleware.md

    * โšซ๏ธ ๐Ÿ’ช โคด๏ธ ๐Ÿ•ณ ๐Ÿ‘ˆ **๐Ÿ“จ** โš–๏ธ ๐Ÿƒ ๐Ÿ™† ๐Ÿ’ช ๐Ÿ“Ÿ.
    * โคด๏ธ โšซ๏ธ ๐Ÿšถโ€โ™€๏ธ **๐Ÿ“จ** ๐Ÿ› ๏ธ ๐ŸŽ‚ ๐Ÿˆธ ( *โžก ๐Ÿ› ๏ธ*).
    * โšซ๏ธ โคด๏ธ โœŠ **๐Ÿ“จ** ๐Ÿ— ๐Ÿˆธ ( *โžก ๐Ÿ› ๏ธ*).
    * โšซ๏ธ ๐Ÿ’ช ๐Ÿ•ณ ๐Ÿ‘ˆ **๐Ÿ“จ** โš–๏ธ ๐Ÿƒ ๐Ÿ™† ๐Ÿ’ช ๐Ÿ“Ÿ.
    * โคด๏ธ โšซ๏ธ ๐Ÿ“จ **๐Ÿ“จ**.
    
    /// note | "๐Ÿ“ก โ„น"
    
    ๐Ÿšฅ ๐Ÿ‘† โœ”๏ธ ๐Ÿ”— โฎ๏ธ `yield`, ๐Ÿšช ๐Ÿ“Ÿ ๐Ÿ”œ ๐Ÿƒ *โฎ๏ธ* ๐Ÿ› ๏ธ.
    
    ๐Ÿšฅ ๐Ÿ“ค ๐Ÿ™† ๐Ÿ–ฅ ๐Ÿ“‹ (๐Ÿ“„ โช), ๐Ÿ‘ซ ๐Ÿ”œ ๐Ÿƒ *โฎ๏ธ* ๐ŸŒ ๐Ÿ› ๏ธ.
    
    ///
    
    ## โœ ๐Ÿ› ๏ธ
    
    โœ ๐Ÿ› ๏ธ ๐Ÿ‘† โš™๏ธ ๐Ÿ‘จโ€๐ŸŽจ `@app.middleware("http")` ๐Ÿ”› ๐Ÿ” ๐Ÿ”ข.
    
    ๐Ÿ› ๏ธ ๐Ÿ”ข ๐Ÿ“จ:
    
    *  `request`.
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 2.4K bytes
    - Viewed (0)
Back to top