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.
互斥现象能由使用信号灯或互斥完成。
In order to initialize the semaphore-set data structure, use the semctl system call with the IPC_SET command.
为了对信号量集数据结构进行初始化,可以使用IPC_SET命令来调用semctl系统调用。
Use different types of semaphore classes
使用不同类型的信号量类
For example, if a customer wants to enable semaphore debug on all of their Domino servers; they can use this API to check each server to see if the setting is already turned on.
例如,如果客户想对所有其Domino服务器启用信号灯(semaphore)调试,那么他们可以使用该API来检查每台服务器,查看是否已经开启了相关设置。
If you want, you can use the Linux kill command to end a session, but this can leave some dangling semaphore files that you will later need to manually delete.
如果您想结束某个会话,可以使用Linux的kill命令,但这会留下一些悬而未决的信号文件,需要您稍后手工删除它们。
The solution, of course, is to use finally to release the semaphore permit; an easy enough — but all-too-often-forgotten — approach.
当然,解决方案是使用finally来释放信号量许可证,这是一个很简单却容易被遗忘的方法。
Linux POSIX semaphores use sem_destroy to destroy the unnamed semaphore.
LinuxPOSIX信号使用sem_destroy来销毁无名称的信号。
Linux POSIX semaphores use sem_post to post an event semaphore.
LinuxPOSIX信号量使用sem_post来发出一个事件信号量。
Linux POSIX semaphores use sem_wait to suspend the calling thread until the semaphore has a non-zero count.
LinuxPOSIX信号使用sem_wait来挂起发出调用的线程,直到信号拥有了非零的计数值。
It is up to your discretion to use either one based on application logic. The various points to consider in the mapping process of the event semaphore are.
您应该基于应用程序的逻辑来判断使用哪种方法。
By default, Quartz will select the most appropriate (pre-bundled) Semaphore implementation to use.
默认情况下,石英将选择最合适的(预先绑定)信号灯使用的执行情况。
The XATM Intelligent Traffic Semaphore has passed the check and accept presided by Shaanxi Science & Technology Committee, and the use of it is being popularized in Xi'an.
目前XATM智能交通信号系统已通过了陕西省省级验收,并且已经在西安市推广使用。
The XATM Intelligent Traffic Semaphore has passed the check and accept presided by Shaanxi Science & Technology Committee, and the use of it is being popularized in Xi'an.
目前XATM智能交通信号系统已通过了陕西省省级验收,并且已经在西安市推广使用。
应用推荐