12a18e699SShuo Chen#include "EventLoop.h" 22a18e699SShuo Chen#include "thread/Thread.h" 32a18e699SShuo Chen 42a18e699SShuo Chenmuduo::EventLoop* g_loop; 52a18e699SShuo Chen 62a18e699SShuo Chenvoid threadFunc() 72a18e699SShuo Chen{ 82a18e699SShuo Chen g_loop->loop(); 92a18e699SShuo Chen} 102a18e699SShuo Chen 112a18e699SShuo Chenint main() 122a18e699SShuo Chen{ 132a18e699SShuo Chen muduo::EventLoop loop; 142a18e699SShuo Chen g_loop = &loop; 152a18e699SShuo Chen muduo::Thread t(threadFunc); 162a18e699SShuo Chen t.start(); 172a18e699SShuo Chen t.join(); 182a18e699SShuo Chen} 19