Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
之前用EventQueue 都是用以下寫法,不需要宣告 Thread。
NoThread
EventQueue queue(32 * EVENTS_EVENT_SIZE); int main () { ... ... queue.dispatch(); }現在看到新版的寫法如下,有宣告 Thread。
Thread
EventQueue queue(32 * EVENTS_EVENT_SIZE); Thread t; int main () { t.start(callback(&queue, &EventQueue::dispatch_forever)); ... ... }上下兩個版本是有甚麼差異嗎 ?