java.lang.Object
ortus.boxlang.runtime.components.Component
ortus.boxlang.runtime.components.async.Thread

@BoxComponent(allowsBody=true) public class Thread extends Component
  • Constructor Details

    • Thread

      public Thread()
      Constructor
  • Method Details

    • _invoke

      public Component.BodyResult _invoke(IBoxContext context, IStruct attributes, Component.ComponentBody body, IStruct executionState)
      The thread component enables multithreaded programming in BoxLang. Threads are independent streams of execution, and multiple threads on a page can execute simultaneously and asynchronously, letting you perform asynchronous processing. Code within the thread component body executes on a separate thread while the request thread continues processing without waiting for the thread body to finish. You use this tag to run or end a thread, temporarily stop thread execution, or join together multiple threads.
      Specified by:
      _invoke in class Component
      Parameters:
      context - The context in which the Component is being invoked
      attributes - The attributes to the Component
      body - The body of the Component
      executionState - The execution state of the Component
      Returns:
      The result of the invocation