LassoScript Utility
Basics Browse Detail

[Thread_Abort]

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

Description

[Thread_Abort] accepts an integer thread ID and aborts the thread. Thread IDs can be acquired from the [Thread_GetCurrentID] tag, [Thread_List] tag, or using the -GetID parameter of the [Tag->AsAsync] tag.

Lasso will first attempt to gracefully terminate the thread. If the thread does not terminate within a short time period then the thread will be terminated forcefully. Most threads can be terminated gracefully. However, if the thread is forcefully terminated then any memory which is in use by the thread will not be released. Aborting many threads can result in a memory leak.

The Site Administrator can abort any thread running in the site. Other Lasso users can only abort threads that were created by that user. Using [Thread_Abort] on the current thread is the same as using the [Abort] 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_Abort: 'Thread ID']

Parameters

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

Examples

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