Search Options

Results per page
Sort
Preferred Languages
Advance

Results 91 - 100 of 974 for kAsync (0.24 sec)

  1. src/runtime/chanbarrier_test.go

    package runtime_test
    
    import (
    	"runtime"
    	"sync"
    	"testing"
    )
    
    type response struct {
    }
    
    type myError struct {
    }
    
    func (myError) Error() string { return "" }
    
    func doRequest(useSelect bool) (*response, error) {
    	type async struct {
    		resp *response
    		err  error
    	}
    	ch := make(chan *async, 0)
    	done := make(chan struct{}, 0)
    
    	if useSelect {
    		go func() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 06 17:50:18 UTC 2024
    - 1.4K bytes
    - Viewed (0)
  2. testing/internal-testing/src/test/groovy/org/gradle/test/fixtures/concurrent/ConcurrentSpecTest.groovy

            when:
            async {
                thread.blockUntil.unknown
            }
    
            then:
            e = thrown()
            e.message == "Timeout waiting for instant 'unknown' to be defined by another thread."
    
            when:
            start {
                thread.blockUntil.unknown
            }
            async { }
    
            then:
            e = thrown()
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 04 07:21:38 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  3. docs_src/custom_request_and_route/tutorial001.py

            async def custom_route_handler(request: Request) -> Response:
                request = GzipRequest(request.scope, request.receive)
                return await original_route_handler(request)
    
            return custom_route_handler
    
    
    app = FastAPI()
    app.router.route_class = GzipRoute
    
    
    @app.post("/sum")
    async def sum_numbers(numbers: List[int] = Body()):
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri May 13 23:38:22 UTC 2022
    - 973 bytes
    - Viewed (0)
  4. docs_src/generate_clients/tutorial003_py39.py

    async def create_item(item: Item):
        return {"message": "Item received"}
    
    
    @app.get("/items/", response_model=list[Item], tags=["items"])
    async def get_items():
        return [
            {"name": "Plumbus", "price": 3},
            {"name": "Portal Gun", "price": 9001},
        ]
    
    
    @app.post("/users/", response_model=ResponseMessage, tags=["users"])
    async def create_user(user: User):
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Mar 04 22:02:18 UTC 2022
    - 914 bytes
    - Viewed (0)
  5. platforms/documentation/docs/src/docs/userguide/img/android-studio-build-sync-popup.png

    android-studio-build-sync-popup.png...
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Nov 27 17:53:42 UTC 2023
    - 7.5K bytes
    - Viewed (0)
  6. docs_src/request_files/tutorial002_py39.py

    app = FastAPI()
    
    
    @app.post("/files/")
    async def create_files(files: list[bytes] = File()):
        return {"file_sizes": [len(file) for file in files]}
    
    
    @app.post("/uploadfiles/")
    async def create_upload_files(files: list[UploadFile]):
        return {"filenames": [file.filename for file in files]}
    
    
    @app.get("/")
    async def main():
        content = """
    <body>
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri May 13 23:38:22 UTC 2022
    - 786 bytes
    - Viewed (0)
  7. docs_src/security/tutorial005.py

    @app.get("/users/me/", response_model=User)
    async def read_users_me(current_user: User = Depends(get_current_active_user)):
        return current_user
    
    
    @app.get("/users/me/items/")
    async def read_own_items(
        current_user: User = Security(get_current_active_user, scopes=["items"]),
    ):
        return [{"item_id": "Foo", "owner": current_user.username}]
    
    
    @app.get("/status/")
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Mon May 20 17:37:28 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  8. docs_src/security/tutorial005_an.py

                )
        return user
    
    
    async def get_current_active_user(
        current_user: Annotated[User, Security(get_current_user, scopes=["me"])],
    ):
        if current_user.disabled:
            raise HTTPException(status_code=400, detail="Inactive user")
        return current_user
    
    
    @app.post("/token")
    async def login_for_access_token(
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Mon May 20 17:37:28 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  9. docs_src/security/tutorial003_an_py310.py

        return user
    
    
    async def get_current_user(token: Annotated[str, Depends(oauth2_scheme)]):
        user = fake_decode_token(token)
        if not user:
            raise HTTPException(
                status_code=status.HTTP_401_UNAUTHORIZED,
                detail="Invalid authentication credentials",
                headers={"WWW-Authenticate": "Bearer"},
            )
        return user
    
    
    async def get_current_active_user(
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Tue Mar 26 16:56:53 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  10. docs_src/request_files/tutorial002_an.py

    app = FastAPI()
    
    
    @app.post("/files/")
    async def create_files(files: Annotated[List[bytes], File()]):
        return {"file_sizes": [len(file) for file in files]}
    
    
    @app.post("/uploadfiles/")
    async def create_upload_files(files: List[UploadFile]):
        return {"filenames": [file.filename for file in files]}
    
    
    @app.get("/")
    async def main():
        content = """
    <body>
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 861 bytes
    - Viewed (0)
Back to top