User Tools

Site Tools


action:Semaphore_Lock

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
action:Semaphore_Lock [2019/08/25 20:39]
JMichaelTX [Preventing Multiple Executions of One or More Macros] Rev #2
action:Semaphore_Lock [2022/10/30 21:40]
peternlewis [Macros Triggered by the User]
Line 1: Line 1:
 ====== Semaphore Actions ====== ====== Semaphore Actions ======
  
-The //Semaphore actions// (Lock, Unlock and Reset) allow you prevent (a) multiple triggers of the same macro from executing simultaneously,​ and/or (b) multiple macros from executing simultaneously.+The //Semaphore actions// (Lock, Unlock and Reset) allow you to prevent (a) multiple triggers of the same macro from executing simultaneously,​ and/or (b) multiple macros from executing simultaneously.
  
 ===== Background ===== ===== Background =====
Line 9: Line 9:
 ==== Macros Triggered by the User ==== ==== Macros Triggered by the User ====
  
 +Although you rarely have multiple macros triggered at the same time, the normal behaviour in Keyboard Maestro is that all triggered macros run simultaneously,​ with actions from each independently triggered macro running at the same time.
  
-The normal case is that all triggered macros run simultaneously (or synchronously),​ although you rarely have multiple macros triggered at the same time. +Most macros are triggered explicitly by the user, and the user waits for them to complete before ​they trigger ​another macro. So macros triggered like this will rarely run at the same time.
- +
-Most macros are triggered explicitly by the user, and the user expects ​them to complete before ​he/she triggers ​another macro. So macros triggered like this will rarely run at the same time.+
  
 ==== Macros Triggered in the Background ==== ==== Macros Triggered in the Background ====
Line 24: Line 23:
 **The //Semaphore actions// require a _Semaphore Name_, which uniquely identify each _Semaphore Lock_.** ​ Use a different _Semaphore Name_ to identify different (independent) _Semaphore Locks_. **The //Semaphore actions// require a _Semaphore Name_, which uniquely identify each _Semaphore Lock_.** ​ Use a different _Semaphore Name_ to identify different (independent) _Semaphore Locks_.
  
-**In order to prevent simultaneous executions (instances) of one or more macros that have _Semaphore Locks_ ​wit the same _Semaphore Name_, do the following:​**\\+**In order to prevent simultaneous executions (instances) of one or more macros that have _Semaphore Locks_ ​with the same _Semaphore Name_, do the following:​**\\
  
   * Place a //Semaphore Lock// Action (using the same Semaphore Name) as the first action of each Macro that you wish to prevent executing simultaneously.   * Place a //Semaphore Lock// Action (using the same Semaphore Name) as the first action of each Macro that you wish to prevent executing simultaneously.
action/Semaphore_Lock.txt · Last modified: 2022/10/30 21:42 by peternlewis