- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for ErrIsFull (0.08 sec)
-
internal/ringbuffer/ring_buffer.go
"unsafe" ) var ( // ErrTooMuchDataToWrite is returned when the data to write is more than the buffer size. ErrTooMuchDataToWrite = errors.New("too much data to write") // ErrIsFull is returned when the buffer is full and not blocking. ErrIsFull = errors.New("ringbuffer is full") // ErrIsEmpty is returned when the buffer is empty and not blocking. ErrIsEmpty = errors.New("ringbuffer is empty")
Registered: Sun Oct 27 19:28:09 UTC 2024 - Last Modified: Wed May 15 00:11:04 UTC 2024 - 13.3K bytes - Viewed (0) -
internal/ringbuffer/ring_buffer_test.go
// write more 4 bytes, should reject n, err = rb.Write([]byte(strings.Repeat("abcd", 1))) if err == nil { t.Fatalf("expect an error but got nil. n=%d, r.w=%d, r.r=%d", n, rb.w, rb.r) } if err != ErrIsFull { t.Fatalf("expect ErrIsFull but got nil") } if n != 0 { t.Fatalf("expect write 0 bytes but got %d", n) } if rb.Length() != 64 { t.Fatalf("expect len 64 bytes but got %d. r.w=%d, r.r=%d", rb.Length(), rb.w, rb.r)
Registered: Sun Oct 27 19:28:09 UTC 2024 - Last Modified: Wed May 15 00:11:04 UTC 2024 - 26.8K bytes - Viewed (0)