19a1e991dSShuo Chen#include "EventLoop.h" 29a1e991dSShuo Chen#include "thread/Thread.h" 39a1e991dSShuo Chen 49a1e991dSShuo Chenmuduo::EventLoop* g_loop; 59a1e991dSShuo Chen 69a1e991dSShuo Chenvoid threadFunc() 79a1e991dSShuo Chen{ 89a1e991dSShuo Chen g_loop->loop(); 99a1e991dSShuo Chen} 109a1e991dSShuo Chen 119a1e991dSShuo Chenint main() 129a1e991dSShuo Chen{ 139a1e991dSShuo Chen muduo::EventLoop loop; 149a1e991dSShuo Chen g_loop = &loop; 159a1e991dSShuo Chen muduo::Thread t(threadFunc); 169a1e991dSShuo Chen t.start(); 179a1e991dSShuo Chen t.join(); 189a1e991dSShuo Chen} 19