[Thread_Exists] accepts an integer thread ID and returns True if the thread is currently running or False othewise. Thread IDs can be acquired from the [Thread_GetCurrentID] tag, [Thread_List] tag, or using the -GetID parameter of the [Tag->AsAsync] tag.
Each thread in Lasso represents either a browser initiated page load or an asynchronous tag or compound expression. The [Thread_List] will always include one ID which represents the current page load (also returned by [Thread_GetCurrentID]) and usually will also have IDs for the background processes in Lasso which manage the email queue, event scheduler, and session manager.
Note that since threads can be created and destroyed very quickly the [Thread_Exists] tag should be used to test whether a thread ID is still running before attempting to modify the thread.
[Thread_Exists: 'Thread ID']
[If: (Thread_Exists: 'Thread ID']
...
[/If]
See the Lasso 8 Language Guide for examples of how to use this tag.
Tag Link | [Thread_Exists] | Category | Thread |
---|---|---|---|
Type | Substitution | Data Source | Any |
Support | Preferred | Version | 8.5 |
Output Type | Boolean | Security | None |
Implementation | Internal | Sets | Lasso 8.5 |
Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.
©LassoSoft Inc 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft