With a traditional concurrent environment, you might use a solution such as a semaphore that allows processes to determine whether a variable is 'in use' or can be updated.
在传统并行环境中,您可以使用信号量这样的解决方案,允许进程确定一个变量是否 “处于使用中”,还是可更新。
Usually, the main use of a semaphore is to synchronize a thread?s action with other threads.
通常,信号的主要用途是同步某个线程与其他线程的动作。
Mutual exclusion can be achieved with the use of a semaphore or mutex.
互斥现象能由使用信号灯或互斥完成。
应用推荐