timeout
September 14, 2025 ยท View on GitHub
Shows how to use xtd::threading::timeout class.
Sources
Build and run
Open "Command Prompt" or "Terminal". Navigate to the folder that contains the project and type the following:
xtdc run
Output
new_thread is executing thread_method.
main thread calls interrupt on new_thread.
new_thread going to sleep.
new_thread cannot go to sleep - interrupted by main thread.