- Sort Score
- Result 10 results
- Languages All
Results 881 - 890 of 1,174 for fsync (0.02 sec)
-
docs/pt/docs/tutorial/background-tasks.md
É apenas uma função padrão que pode receber parâmetros. Pode ser uma função `async def` ou `def` normal, o **FastAPI** saberá como lidar com isso corretamente. Nesse caso, a função de tarefa gravará em um arquivo (simulando o envio de um e-mail). E como a operação de gravação não usa `async` e `await`, definimos a função com `def` normal: ```Python hl_lines="6-9"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 5.3K bytes - Viewed (0) -
docs/en/docs/tutorial/background-tasks.md
It is just a standard function that can receive parameters. It can be an `async def` or normal `def` function, **FastAPI** will know how to handle it correctly. In this case, the task function will write to a file (simulating sending an email). And as the write operation doesn't use `async` and `await`, we define the function with normal `def`: {* ../../docs_src/background_tasks/tutorial001.py hl[6:9] *}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 27 15:22:48 UTC 2024 - 4.8K bytes - Viewed (0) -
cmd/site-replication-metrics.go
// // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. package cmd import ( "fmt" "sync" "sync/atomic" "time" "github.com/minio/madmin-go/v3" "github.com/minio/minio-go/v7" ) //go:generate msgp -file $GOFILE // RStat has replication error stats type RStat struct {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Feb 06 06:00:45 UTC 2024 - 8.2K bytes - Viewed (0) -
internal/logger/logonce.go
import ( "context" "errors" "sync" "time" ) // LogOnce provides the function type for logger.LogOnceIf() function type LogOnce func(ctx context.Context, err error, id string, errKind ...interface{}) type onceErr struct { Err error Count int } // Holds a map of recently logged errors. type logOnceType struct { IDMap map[string]onceErr sync.Mutex }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Apr 04 12:04:40 UTC 2024 - 3.8K bytes - Viewed (0) -
internal/logger/reqinfo.go
// // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. package logger import ( "context" "fmt" "sync" "github.com/minio/minio/internal/auth" ) // Key used for Get/SetReqInfo type contextKeyType string const contextLogKey = contextKeyType("miniolog") // KeyVal - appended to ReqInfo.Tags
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Aug 13 22:22:04 UTC 2024 - 4.4K bytes - Viewed (0) -
src/bytes/reader_test.go
// Copyright 2012 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package bytes_test import ( . "bytes" "fmt" "io" "sync" "testing" ) func TestReader(t *testing.T) { r := NewReader([]byte("0123456789")) tests := []struct { off int64 seek int n int want string wantpos int64 readerr error
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Mon Dec 13 18:45:54 UTC 2021 - 8K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/AsyncDns.kt
* */ package okhttp3 import java.net.InetAddress import java.net.UnknownHostException import java.util.concurrent.CountDownLatch import okio.IOException /** * An async domain name service that resolves IP addresses for host names. * * The main implementations will typically be implemented using specific DNS libraries such as * * Android DnsResolver * * OkHttp DnsOverHttps
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Tue Jan 23 14:31:42 UTC 2024 - 3.5K bytes - Viewed (0) -
tests/test_dependency_normal_exceptions.py
initial_fake_database = {"rick": "Rick Sanchez"} fake_database = initial_fake_database.copy() initial_state = {"except": False, "finally": False} state = initial_state.copy() app = FastAPI() async def get_database(): temp_database = fake_database.copy() try: yield temp_database fake_database.update(temp_database) except HTTPException: state["except"] = True raise
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Feb 24 23:06:37 UTC 2024 - 1.9K bytes - Viewed (0) -
cmd/dynamic-timeouts_test.go
// // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. package cmd import ( "math/rand" "runtime" "sync" "testing" "time" ) func TestDynamicTimeoutSingleIncrease(t *testing.T) { timeout := newDynamicTimeout(time.Minute, time.Second) initial := timeout.Timeout()
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Oct 14 10:08:40 UTC 2022 - 5.4K bytes - Viewed (0) -
cmd/storage-rest-server.go
write(block) if canWrite { w.(http.Flusher).Flush() } } } }() return &h } var poolBuf8k = sync.Pool{ New: func() interface{} { b := make([]byte, 8192) return &b }, } var poolBuf128k = sync.Pool{ New: func() interface{} { b := make([]byte, 128<<10) return b }, } // waitForHTTPStream will wait for responses where
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Aug 14 17:11:51 UTC 2024 - 45.7K bytes - Viewed (0)