Hacker News new | past | comments | ask | show | jobs | submit login

It’s kind of a weird design that some of your variables (which you can define anywhere in the scope FWIW) just randomly define a critical section. I strongly prefer languages that do a

  with lock {
      // do stuff 
  }
design. This could be C++ too to be honest because lambdas exist but RAII is just too common for people to design their locks like this.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: