()
| 549 | const capturedSlotMetaIdx = slotMetaIdx; |
| 550 | |
| 551 | const release = () => { |
| 552 | if (released) return; |
| 553 | released = true; |
| 554 | |
| 555 | Atomics.store( |
| 556 | metadataView, |
| 557 | capturedSlotMetaIdx + META_SLOT_STATE, |
| 558 | SLOT_STATE.EMPTY, |
| 559 | ); |
| 560 | |
| 561 | const nextIdx = (capturedReadIdx + 1) % slotCount; |
| 562 | advanceReadIndexCAS(controlView, capturedReadIdx, nextIdx); |
| 563 | }; |
| 564 | |
| 565 | return { data, frameSize, release }; |
| 566 | } |
no test coverage detected