← Questions
Thread-safe job registry with expiry
0
I was asked this
No reports yet. Sign in to say where you were asked it.
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.
No official answer yet. Write yours on the right and run it.
Nothing published yet.
Sign in to submit your code; every attempt is kept here.
Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding
