LassoScript Utility
Basics Browse Detail

[Thread_Exists]

Tag Link [Thread_Exists] Category Threads
Type Substitution Source Available Yes
Support Preferred Version 8.5
Change New Data Source Any
Output Type Boolean Security None
Implementation Internal Sets Lasso 8.5

Description

[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.

Syntax

[Thread_Exists: 'Thread ID']

[If: (Thread_Exists: 'Thread ID']
...
[/If]

Parameters

Required Parameters
Thread ID The ID of the thread to be inspected.

Examples

See the Lasso 8 Language Guide for examples of how to use this tag.