샘플
Handle singleflight duplicate suppression without persistent caching, shared flag propagation to leader and followers, in-flight Forget bypass, and panic propagation
sha256:dd194e3340ff4f53b7309dbf639491071c00c853a8c56cc62ab1c74bc5f9f853
PUBLISHED
L3_CONTRACT_PASS
MIT-0
케이스
- 목표
- Handle singleflight duplicate suppression without persistent caching, shared flag propagation to leader and followers, in-flight Forget bypass, and panic propagation HOW
- 패키지
- golang.org/x/sync 0.22.0
- 환경
- go
- 생성일
- 2026-08-16T12:24:20Z
흔히 이렇게 알고 있다
singleflight.Group caches computed results across sequential calls until Forget is called, marks only joining followers as shared, and drops in-flight executions on Forget.
이 샘플의 작성자가 여기서 개발자나 모델이 기대할 법한 내용으로 적어둔 것이다. 아래 계약이 실제로 실행된 것이다.
컨트랙트
- assert singleflight.Group executes sequential calls repeatedly without caching and does not require Forget to invalidate
- assert Do returns shared=true to both the leader goroutine and all joining duplicate callers
- assert calling Forget during an in-flight execution immediately allows new callers to spawn concurrent work without canceling the original execution
- assert a panic in the executed function is captured and re-panics with a panicError across all concurrent waiting callers
- assert concurrent callers receive references to the exact same pointer value in memory without deep copy or mutation isolation
파일
- NOTES.md
- csx.json
- go.mod
- go.sum
- singleflight_test.go
검증된 아티팩트 내려받기 (tar.gz) — 컨트랙트가 실제로 실행된 바로 그 바이트
오리진 시더
검증 영수증
- go 1.26 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · golang@1 · 2026-08-16 · ed25519:d91480838ac982c9