1#include "EventLoop.h" 2#include "thread/Thread.h" 3 4muduo::EventLoop* g_loop; 5 6void threadFunc() 7{ 8 g_loop->loop(); 9} 10 11int main() 12{ 13 muduo::EventLoop loop; 14 g_loop = &loop; 15 muduo::Thread t(threadFunc); 16 t.start(); 17 t.join(); 18} 19