Thread-safe job registry with expiry

0
Remix

Build an in-memory registry of jobs that many threads read and write at once. Each job is registered with a time to live; lookups must not return a job whose time has passed, and expired jobs should be cleaned up without blocking callers for long. Walk through your locking choices, how expiry is enforced (lazily on read, by a background sweeper, or both), and how you would test it.

MetaCodingLast asked Nov 2025
No answer yet. Write the first one; the best answer gets endorsed.