Tag Link | [Tag->AsAsync] | Category | Tags |
---|---|---|---|
Type | Member | Source Available | No |
Support | Preferred | Version | 6.0 |
Change | Unchanged | Data Source | Any |
Output Type | None | Security | None |
Implementation | LCAPI | Sets | Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0 |
The [Tag->AsAsync] tag can be used to execute a compound expression in another thread. The page which executes this tag can continue processing. The code within the compound expression will be processed simultaneously as another process.
The [Sleep] tag can be used to pause the execution of the compound expression for a number of milliseconds. This allows the code in the compound expression to finish executing after the page which triggered it has already been delivered to the Web client.
A compound expression that is triggered asynchronously will not return a value. The variables that are on the page which called the asynchronous process will not be available within the compound expression.
Values can be returned from a compound expression by setting a global variable or modifying a database record.
Compound expressions can be created by surrounding a portion of LassoScript style code with braces {}. The compound expression can be stored in a variable or run using the [Tag->AsAsync] tag.
[{ Sleep: 100; ... }->(AsAsync)]
[Variable: 'myExpression' = { Sleep: 100; ... }]
[$myExpression->(AsAsync)]
No Parameters Required.
See the Lasso 8 Language Guide for examples of how to use this tag.