Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 41 - 50 of 1,100 for Fsync (0.02 seconds)

  1. tests/test_dependency_contextmanager.py

    class OtherDependencyError(Exception):
        pass
    
    
    async def asyncgen_state(state: dict[str, str] = Depends(get_state)):
        state["/async"] = "asyncgen started"
        yield state["/async"]
        state["/async"] = "asyncgen completed"
    
    
    def generator_state(state: dict[str, str] = Depends(get_state)):
        state["/sync"] = "generator started"
        yield state["/sync"]
        state["/sync"] = "generator completed"
    
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Wed Dec 17 21:25:59 GMT 2025
    - 11.5K bytes
    - Click Count (0)
  2. cmd/erasure.go

    package cmd
    
    import (
    	"context"
    	"errors"
    	"fmt"
    	"maps"
    	"math/rand"
    	"os"
    	"runtime"
    	"sort"
    	"sync"
    	"time"
    
    	"github.com/minio/madmin-go/v3"
    	"github.com/minio/minio/internal/dsync"
    	xioutil "github.com/minio/minio/internal/ioutil"
    	"github.com/minio/pkg/v3/sync/errgroup"
    )
    
    // list all errors that can be ignore in a bucket operation.
    Created: Sun Apr 05 19:28:12 GMT 2026
    - Last Modified: Sun Sep 28 20:59:21 GMT 2025
    - 16.1K bytes
    - Click Count (0)
  3. cmd/erasure-sets.go

    			// Reset the timer for next interval
    			monitor.Reset(monitorInterval)
    		}
    	}
    }
    
    func (s *erasureSets) GetLockers(setIndex int) func() ([]dsync.NetLocker, string) {
    	return func() ([]dsync.NetLocker, string) {
    		lockers := make([]dsync.NetLocker, len(s.erasureLockers[setIndex]))
    		copy(lockers, s.erasureLockers[setIndex])
    		return lockers, s.erasureLockOwner
    	}
    }
    
    Created: Sun Apr 05 19:28:12 GMT 2026
    - Last Modified: Fri Aug 29 02:39:48 GMT 2025
    - 37K bytes
    - Click Count (1)
  4. tests/test_sse.py

    keepalive_app = FastAPI()
    
    
    @keepalive_app.get("/slow-async", response_class=EventSourceResponse)
    async def slow_async_stream():
        yield {"n": 1}
        # Sleep longer than the (monkeypatched) ping interval so a keepalive
        # comment is emitted before the next item.
        await asyncio.sleep(0.3)
        yield {"n": 2}
    
    
    @keepalive_app.get("/slow-sync", response_class=EventSourceResponse)
    def slow_sync_stream():
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Mar 01 09:21:52 GMT 2026
    - 9.8K bytes
    - Click Count (0)
  5. tests/test_stream_bare_type.py

    
    app = FastAPI()
    
    
    @app.get("/items/stream-bare-async")
    async def stream_bare_async() -> AsyncIterable:
        yield {"name": "foo"}
    
    
    @app.get("/items/stream-bare-sync")
    def stream_bare_sync() -> Iterable:
        yield {"name": "bar"}
    
    
    client = TestClient(app)
    
    
    def test_stream_bare_async_iterable():
        response = client.get("/items/stream-bare-async")
        assert response.status_code == 200
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Feb 27 18:56:47 GMT 2026
    - 1.1K bytes
    - Click Count (0)
  6. fastapi/.agents/skills/fastapi/references/other-tools.md

    ## ty
    
    If ty is available, use it to check types.
    
    ## Asyncer
    
    When needing to run blocking code inside of async functions, or async code inside of blocking functions, suggest using Asyncer.
    
    Prefer it over AnyIO or asyncio.
    
    Install:
    
    ```bash
    uv add asyncer
    ```
    
    Run blocking sync code inside of async with `asyncify()`:
    
    ```python
    from asyncer import asyncify
    from fastapi import FastAPI
    
    app = FastAPI()
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Mar 01 10:05:57 GMT 2026
    - 1.5K bytes
    - Click Count (0)
  7. cmd/lock-rest-server-common_test.go

    		lockRequesterInfo2,
    	}
    
    	lri := locker.ll.lockMap["name"]
    
    	// test unknown uid
    	if locker.ll.removeEntry("name", dsync.LockArgs{
    		Owner: "owner",
    		UID:   "unknown-uid",
    	}, &lri) {
    		t.Errorf("Expected %#v, got %#v", false, true)
    	}
    
    	if !locker.ll.removeEntry("name", dsync.LockArgs{
    		Owner: "owner",
    		UID:   "0123-4567",
    	}, &lri) {
    		t.Errorf("Expected %#v, got %#v", true, false)
    	} else {
    Created: Sun Apr 05 19:28:12 GMT 2026
    - Last Modified: Wed Apr 09 14:28:39 GMT 2025
    - 3.2K bytes
    - Click Count (0)
  8. ci/official/upload.sh

    # "/path/bar". This script uses "gsutil rsync" instead, which acts on directory
    # contents. About arguments to gsutil:
    # "gsutil -m rsync" runs in parallel.
    # "gsutil rsync -r" is recursive and makes directories work.
    # "gsutil rsync -d" is "sync and delete files from destination if not present in source"
    
    DOWNLOADS="$(mktemp -d)"
    mkdir -p "$DOWNLOADS"
    gsutil -m rsync -r "$TFCI_ARTIFACT_STAGING_GCS_URI" "$DOWNLOADS"
    Created: Tue Apr 07 12:39:13 GMT 2026
    - Last Modified: Tue Mar 04 22:39:12 GMT 2025
    - 2.8K bytes
    - Click Count (0)
  9. tests/test_stream_json_validation_error.py

    class Item(BaseModel):
        name: str
        price: float
    
    
    app = FastAPI()
    
    
    @app.get("/items/stream-invalid")
    async def stream_items_invalid() -> AsyncIterable[Item]:
        yield {"name": "valid", "price": 1.0}
        yield {"name": "invalid", "price": "not-a-number"}
    
    
    @app.get("/items/stream-invalid-sync")
    def stream_items_invalid_sync() -> Iterable[Item]:
        yield {"name": "valid", "price": 1.0}
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Feb 27 18:56:47 GMT 2026
    - 991 bytes
    - Click Count (0)
  10. cmd/local-locker.go

    package cmd
    
    //go:generate msgp -file=$GOFILE -unexported
    
    import (
    	"context"
    	"fmt"
    	"strconv"
    	"sync"
    	"sync/atomic"
    	"time"
    
    	"github.com/minio/minio/internal/dsync"
    )
    
    // Reject new lock requests immediately when this many are queued
    // for the local lock mutex.
    // We do not block unlocking or maintenance, but they add to the count.
    Created: Sun Apr 05 19:28:12 GMT 2026
    - Last Modified: Sun Sep 28 20:59:21 GMT 2025
    - 12K bytes
    - Click Count (0)
Back to Top