这个实现适合于单线程程序。
如果你有一个单线程程序,您不需要锁。
If you have a single threaded program, you don't need a lock.
如果代码是位于单线程程序中,可以预期thread_function代码将完整执行。
If this code were in a single-threaded program we'd expect the thread_function code to execute in its entirety.
应用推荐