MCPcopy Create free account
hub / github.com/apache/brpc / bthread_usleep

Function bthread_usleep

src/bthread/bthread.cpp:558–564  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

556}
557
558int bthread_usleep(uint64_t microseconds) {
559 bthread::TaskGroup* g = bthread::BAIDU_GET_VOLATILE_THREAD_LOCAL(tls_task_group);
560 if (NULL != g && !g->is_current_pthread_task()) {
561 return bthread::TaskGroup::usleep(&g, microseconds);
562 }
563 return ::usleep(microseconds);
564}
565
566int bthread_yield(void) {
567 bthread::TaskGroup* g = bthread::BAIDU_GET_VOLATILE_THREAD_LOCAL(tls_task_group);

Callers 15

senderFunction · 0.85
GenerateTokenFunction · 0.85
SendRequestMethod · 0.85
TestFunction · 0.85
senderFunction · 0.85
EchoMethod · 0.85
EchoMethod · 0.85
senderFunction · 0.85
EchoMethod · 0.85
EchoMethod · 0.85
senderFunction · 0.85
EchoMethod · 0.85

Calls 1

Tested by 15

TestFunction · 0.68
worker1_implFunction · 0.68
set_before_anybth_implFunction · 0.68
usleep_thread_implFunction · 0.68
epoll_threadFunction · 0.68
TESTFunction · 0.68
close_the_fdFunction · 0.68
TESTFunction · 0.68
wakerFunction · 0.68
batch_wakerFunction · 0.68
TESTFunction · 0.68
sem_waiterFunction · 0.68