Skip to content

Commit c5658b2

Browse files
author
Amanda Butler
authored
Merge pull request #1180 from ARMmbed/AnotherButler-patch-6
Add tip to ThisThread.md
2 parents b4f5e02 + 38c515c commit c5658b2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/api/rtos/ThisThread.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# ThisThread
22

3+
<span class="tips">**Tip:** `wait` is deprecated in favor of explicit sleep functions. To sleep, replace `wait` with `ThisThread::sleep_for` (C++) or `thread_sleep_for` (C). To wait (without sleeping), call `wait_us`. `wait_us` is safe to call from ISR context.</span>
4+
35
Use the ThisThread class to control the current thread.
46

57
Unlike the [Thread](../apis/thread.html) API, which allows you to create, join and end threads, ThisThread lets you control the thread that's currently running. A thread may not have a corresponding Mbed Thread object because you can create a thread directly with CMSIS-RTOS APIs, or it might be main's thread. You can't manipulate those with Thread methods, but ThisThread functions still work from inside them.

0 commit comments

Comments
 (0)