Tag Link | [Thread_SetPriority] | 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 |
[Thread_SetPriority] requires the ID of a thread and a new integer priority as parameters and sets the priority for the thread. The current priority of threads can be found using [Thread_GetPriority].
The normal priority fo threads can be set using [Thread_Priority_Default]. The new priority for threads must always be between the values returned by [Thread_Priority_Low] and [Thread_Priority_High].
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 there is no guarantee that thread IDs listed by [Thread_List] are still running even by the time the tag has finished processing. [Thread_Exists] can be used to test whether a thread ID is still running.
[Thread_SetPriority: Thread_GetCurrentID, Thread_Priority_Default]
[Thread_SetPriority: Thread_GetCurrentID, Thread_Priority_Low]
[Thread_SetPriority: Thread_GetCurrentID, Thread_Priority_High]
Required Parameters | |
---|---|
Thread ID | The ID of the thread to be modified. |
Priority | The integer priority for the thread. The value must be between [Thread_Priority_Low] and [Thread_Priority_High]. |
See the Lasso 8 Language Guide for examples of how to use this tag.