Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 132 for panics (0.24 sec)

  1. src/iter/iter.go

    		yield := func(v1 V) bool {
    			if done {
    				return false
    			}
    			if !yieldNext {
    				panic("iter.Pull: yield called again before next")
    			}
    			yieldNext = false
    			v, ok = v1, true
    			race.Release(unsafe.Pointer(&racer))
    			coroswitch(c)
    			race.Acquire(unsafe.Pointer(&racer))
    			return !done
    		}
    		// Recover and propagate panics from seq.
    		defer func() {
    			if p := recover(); p != nil {
    				panicValue = p
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 19:09:28 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  2. src/vendor/golang.org/x/crypto/sha3/sha3.go

    	d.state = spongeSqueezing
    	d.n = d.rate
    	copyOut(d, d.storage[:d.rate])
    }
    
    // Write absorbs more data into the hash's state. It panics if any
    // output has already been read.
    func (d *state) Write(p []byte) (written int, err error) {
    	if d.state != spongeAbsorbing {
    		panic("sha3: Write after Read")
    	}
    	written = len(p)
    
    	for len(p) > 0 {
    		if d.n == 0 && len(p) >= d.rate {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  3. src/sync/once.go

    //
    //	config.once.Do(func() { config.init(filename) })
    //
    // Because no call to Do returns until the one call to f returns, if f causes
    // Do to be called, it will deadlock.
    //
    // If f panics, Do considers it to have returned; future calls of Do return
    // without calling f.
    func (o *Once) Do(f func()) {
    	// Note: Here is an incorrect implementation of Do:
    	//
    	//	if o.done.CompareAndSwap(0, 1) {
    	//		f()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 21:14:51 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  4. src/cmd/vendor/golang.org/x/tools/go/analysis/analysis.go

    	// -- facts --
    
    	// ImportObjectFact retrieves a fact associated with obj.
    	// Given a value ptr of type *T, where *T satisfies Fact,
    	// ImportObjectFact copies the value to *ptr.
    	//
    	// ImportObjectFact panics if called after the pass is complete.
    	// ImportObjectFact is not concurrency-safe.
    	ImportObjectFact func(obj types.Object, fact Fact) bool
    
    	// ImportPackageFact retrieves a fact associated with package pkg,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 9.1K bytes
    - Viewed (0)
  5. src/sync/waitgroup.go

    		// Need to model this as a read, because there can be
    		// several concurrent wg.counter transitions from 0.
    		race.Read(unsafe.Pointer(&wg.sema))
    	}
    	if v < 0 {
    		panic("sync: negative WaitGroup counter")
    	}
    	if w != 0 && delta > 0 && v == int32(delta) {
    		panic("sync: WaitGroup misuse: Add called concurrently with Wait")
    	}
    	if v > 0 || w == 0 {
    		return
    	}
    	// This goroutine has set counter to 0 when waiters > 0.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 21:14:51 UTC 2024
    - 4K bytes
    - Viewed (0)
  6. src/cmd/vendor/golang.org/x/tools/internal/typeparams/coretype.go

    // MustDeref returns the type of the variable pointed to by t.
    // It panics if t's core type is not a pointer.
    //
    // TODO(adonovan): ideally this would live in typesinternal, but that
    // creates an import cycle. Move there when we melt this package down.
    func MustDeref(t types.Type) types.Type {
    	if ptr, ok := CoreType(t).(*types.Pointer); ok {
    		return ptr.Elem()
    	}
    	panic(fmt.Sprintf("%v is not a pointer", t))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  7. src/math/big/float.go

    	return z
    }
    
    func validateBinaryOperands(x, y *Float) {
    	if !debugFloat {
    		// avoid performance bugs
    		panic("validateBinaryOperands called but debugFloat is not set")
    	}
    	if len(x.mant) == 0 {
    		panic("empty mantissa for x")
    	}
    	if len(y.mant) == 0 {
    		panic("empty mantissa for y")
    	}
    }
    
    // z = x + y, ignoring signs of x and y for the addition
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 06 15:46:54 UTC 2024
    - 44.5K bytes
    - Viewed (0)
  8. src/time/tick_test.go

    		t.Errorf("Tick(-1) = %v; want nil", got)
    	}
    }
    
    // Test that NewTicker panics when given a duration less than zero.
    func TestNewTickerLtZeroDuration(t *testing.T) {
    	defer func() {
    		if err := recover(); err == nil {
    			t.Errorf("NewTicker(-1) should have panicked")
    		}
    	}()
    	NewTicker(-1)
    }
    
    // Test that Ticker.Reset panics when given a duration less than zero.
    func TestTickerResetLtZeroDuration(t *testing.T) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 11 17:10:37 UTC 2024
    - 14.7K bytes
    - Viewed (0)
  9. src/net/netip/netip.go

    // If ip is the zero [Addr] or an IPv6 address, As4 panics.
    // Note that 0.0.0.0 is not the zero Addr.
    func (ip Addr) As4() (a4 [4]byte) {
    	if ip.z == z4 || ip.Is4In6() {
    		byteorder.BePutUint32(a4[:], uint32(ip.addr.lo))
    		return a4
    	}
    	if ip.z == z0 {
    		panic("As4 called on IP zero value")
    	}
    	panic("As4 called on IPv6 address")
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 17:10:01 UTC 2024
    - 43.2K bytes
    - Viewed (0)
  10. src/cmd/vendor/golang.org/x/build/relnote/relnote.go

    	// the directory "net". That is what we want.
    	slices.Sort(filenames)
    	return filenames, nil
    }
    
    // lastBlock returns the last block in the document.
    // It panics if the document has no blocks.
    func lastBlock(doc *md.Document) md.Block {
    	return doc.Blocks[len(doc.Blocks)-1]
    }
    
    // addLines adds n lines to the position of b.
    // n can be negative.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 12.7K bytes
    - Viewed (0)
Back to top