roo_blink
API Documentation for roo_blink
Loading...
Searching...
No Matches
default_scheduler.cpp
Go to the documentation of this file.
2
3namespace roo_blink {
4
5namespace {
6roo_scheduler::Scheduler default_scheduler;
7
8roo::thread CreateSchedulerThread() {
9 roo::thread::attributes attrs;
10 attrs.set_name("roo_blink");
11 attrs.set_stack_size(3096);
12 attrs.set_priority(6);
13 return roo::thread(attrs, []() {
14 while (true) {
15 default_scheduler.run();
16 }
17 });
18}
19} // namespace
20
21roo_scheduler::Scheduler& DefaultScheduler() {
22 static roo::thread scheduler_thread = CreateSchedulerThread();
23 return default_scheduler;
24}
25
26} // namespace roo_blink