|
|
|
|
|
by Gikoskos
2700 days ago
|
|
Sir Tony Hoare is a legend! Personally one of my favorite concurrency constructs that he invented, but aren't mentioned in the interview, are conditional critical regions. A very simple abstraction that helps you write concurrent code that's maintainable and easy to read. Plus, from my experience, they provide a much more elegant way to solve various concurrency problems. Only possible drawback is that they might perform worse than the alternative, at least in some cases. |
|
Seems very closely related to condition variables - except you specify the condition at the lock site rather than via a “trigger” before an unlock. I think Google’s internal Mutex class had a LockWhen(callback) which is a pleasure to work with. Definitely an awesome concept.