- Sort Score
- Result 10 results
- Languages All
Results 81 - 90 of 628 for recovery (0.2 sec)
-
src/sync/oncefunc.go
func OnceFunc(f func()) func() { var ( once Once valid bool p any ) // Construct the inner closure just once to reduce costs on the fast path. g := func() { defer func() { p = recover() if !valid { // Re-panic immediately so on the first call the user gets a // complete stack trace into f. panic(p) } }() f() f = nil // Do not keep f alive after invoking it.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Nov 21 17:31:33 UTC 2023 - 2K bytes - Viewed (0) -
test/fixedbugs/issue4463.go
unsafe.Sizeof(a) // ERROR "not used" close(c) copy(a, a) delete(m, 0) panic(0) print("foo") println("bar") recover() (close(c)) (copy(a, a)) (delete(m, 0)) (panic(0)) (print("foo")) (println("bar")) (recover()) go append(a, 0) // ERROR "not used|discards result" go cap(a) // ERROR "not used|discards result" go complex(1, 2) // ERROR "not used|discards result"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 02 13:43:18 UTC 2016 - 2.4K bytes - Viewed (0) -
src/runtime/race/testdata/chan_test.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jul 18 19:55:29 UTC 2023 - 11K bytes - Viewed (0) -
test/typeparam/issue50264.go
res := Applicative2(func(a int, b int) int { return 0 }) _ = res } type NoneType[T any] struct{} func (r NoneType[T]) Recover() any { return nil } type Func2[A1, A2, R any] func(a1 A1, a2 A2) R func Some[T any](v T) any { _ = Some2[T](v) return NoneType[T]{}.Recover() } //go:noinline func Some2[T any](v T) any { return v } type Nil struct{}
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 01 19:45:34 UTC 2022 - 822 bytes - Viewed (0) -
test/fixedbugs/issue8158.go
<-c time.Sleep(10 * time.Millisecond) go f2(c) <-c } func f1(done chan bool) { defer func() { recover() done <- true runtime.Goexit() // left stack-allocated Panic struct on gp->panic stack }() panic("p") } func f2(done chan bool) { defer func() { recover() done <- true runtime.Goexit() }() time.Sleep(10 * time.Millisecond) // overwrote Panic struct with Timer struct
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 02 13:43:18 UTC 2016 - 767 bytes - Viewed (0) -
src/runtime/runtime-seh_windows_test.go
"runtime_test.TestSehUnwindDoublePanic.func1", "runtime.gopanic", "runtime_test.TestSehUnwindDoublePanic"} defer func() { defer func() { if recover() == nil { t.Fatal("did not panic") } pcs := sehCallers() testSehCallersEqual(t, pcs, want) }() if recover() == nil { t.Fatal("did not panic") } panic(2) }() panic(1) } func TestSehUnwindNilPointerPanic(t *testing.T) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jul 31 16:52:06 UTC 2023 - 4.7K bytes - Viewed (0) -
test/fixedbugs/issue8132.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 02 13:43:18 UTC 2016 - 534 bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/connection/RetryTlsHandshake.kt
fun retryTlsHandshake(e: IOException): Boolean { return when { // If there was a protocol problem, don't recover. e is ProtocolException -> false // If there was an interruption or timeout (SocketTimeoutException), don't recover. // For the socket connect timeout case we do not try the same host with a different // ConnectionSpec: we assume it is unreachable.
Registered: Sun Jun 16 04:42:17 UTC 2024 - Last Modified: Sun Jan 07 16:05:34 UTC 2024 - 1.7K bytes - Viewed (0) -
test/rename.go
float32 + float64 + imag + int + int8 + int16 + int32 + int64 + len + make + new + nil + panic + print + println + real + recover + rune + string + true + uint + uint8 + uint16 + uint32 + uint64 + uintptr + iota if n != NUM*(NUM-1)/2 { fmt.Println("BUG: wrong n", n, NUM*(NUM-1)/2)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 02 13:43:18 UTC 2016 - 1.5K bytes - Viewed (0) -
src/cmd/go/testdata/script/test_cleanup_failnow.txt
! stdout 'no tests to run' stdout '(?s)panic: die \[recovered\].*panic: die' ! stdout '(?s)panic: die \[recovered\].*panic: die.*panic: die' ! go test -v cleanup_failnow/panic_withcleanup_test.go ! stdout 'no tests to run' stdout '(?s)panic: die \[recovered\].*panic: die' ! stdout '(?s)panic: die \[recovered\].*panic: die.*panic: die' -- cleanup_failnow/panic_nocleanup_test.go --
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 16 14:49:13 UTC 2022 - 1.3K bytes - Viewed (0)