Skip to content

Latest commit

 

History

History
48 lines (32 loc) · 1.13 KB

thread_library.md

File metadata and controls

48 lines (32 loc) · 1.13 KB

Home Standard library

Thread library

Provides standard regular expression functions. For Concert versions 8.0+.

Import

The following statement may be used to import the thread library:

import thread;

Functions

Name Description
get_thread_id Get the current thread's ID.
hardware_concurrency Try to get system hardware thread count. May report 0.
sleep Sleep for argument milliseconds.

Examples

get_thread_id

Returns a sttring representing the current thread's ID.

string data;

call get_thread_id -> data;

hardware_concurrency

int threadCount = 0;
call hardware_concurrency -> threadCount;

sleep

int millis = 500;
println "Sleeping for ", millis, " millis";
call sleep : millis;