Domanda di colloquio di Blue Origin

What is a lock in multi-threading programming?