MCPcopy Create free account
hub / github.com/codechenx/FastTableViewer / TestBuffer_ConcurrentAccess

Function TestBuffer_ConcurrentAccess

buffer_test.go:304–319  ·  view source on GitHub ↗

======================================== Buffer Concurrency Tests ========================================

(t *testing.T)

Source from the content-addressed store, hash-verified

302// ========================================
303
304func TestBuffer_ConcurrentAccess(t *testing.T) {
305 b := createNewBuffer()
306 _ = b.contAppendSli([]string{"A", "B", "C"}, false)
307
308 done := make(chan bool)
309 for i := 0; i < 10; i++ {
310 go func() {
311 _ = b.getCol(0)
312 done <- true
313 }()
314 }
315
316 for i := 0; i < 10; i++ {
317 <-done
318 }
319}
320
321// ========================================
322// Buffer Edge Case Tests

Callers

nothing calls this directly

Calls 3

createNewBufferFunction · 0.85
contAppendSliMethod · 0.80
getColMethod · 0.80

Tested by

no test coverage detected