Verification #30 · 2026-10-23 · Events · Medium · about 12 min
The signal that nobody was waiting for
Latch is a one-bit synchronization object shared by two processes.
signal()fires the latch.await()blocks until the latch has fired, then returns. It must return whethersignal()ran before, at the same time as, or after the call toawait().clear()re-arms the latch: a laterawait()blocks until the nextsignal().
Fix latch.sv.
Write and run your answer in the browser. The hidden tests check it, and it’s free.