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 whether signal() ran before, at the same time as, or after the call to await().
  • clear() re-arms the latch: a later await() blocks until the next signal().

Fix latch.sv.

Write and run your answer in the browser. The hidden tests check it, and it’s free.