threadNew

Creates a new thread of execution based on the passed closure/lambda.

threadNew() → returns void

This function requires BoxLang 1.0.0 and up.  Not supported on Lucee, Adobe ColdFusion, etc.

Argument Reference

runnable function
Required

The closure/lambda to execute in the new thread.

attributes struct
Default: {}

A struct of data to bind into the thread's scope.

name string

The name for the thread.

priority string
Default: normal

The priority of the thread.
Values:
  • high
  • normal
  • low

Examples
Sample code invoking the threadNew function

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub