Built-in Functions
Structures
Built-in Variables and Constants
Conventions
Exchanges
threading
A global multi-threading management tool, providing functions for creating concurrent threads, thread locks, condition variables, and more. This section introduces the member functions of the threading object. Only JavaScript language strategies support this object.
In this sectionRead the whole section
| Name | Description |
| threading.Thread | Creates concurrent threads. |
| threading.getThread | Gets a thread object based on the specified thread ID. |
| threading.mainThread | Gets the thread object of the main thread, which is the thread where the main() function in the strategy is located. |
| threading.currentThread | Gets the thread object of the current thread. |
| threading.Lock | Creates a thread lock object. |
| threading.Condition | Creates a condition variable object, which is used to implement synchronization and communication between threads in a multi-threaded concurrent environment. |
| threading.Event | Creates a thread event object, which is used for synchronization between threads, allowing one thread to wait for notification or signal from another thread. |
| threading.Dict | Creates a dictionary object for passing and sharing data between concurrent threads. |
| threading.Serve | Starts an HTTP, TCP or WebSocket (over HTTP) service inside the strategy process and returns a Server object. |
| threading.pending | Gets the number of concurrent threads currently running in the strategy program. |