title: How to use libevent and pthread together in C
body: <p>The main function is based on libevent, but there is a long run task in the function. So start N treads to run the tasks. Is is this idea OK? And how to use libevent and pthread together in C?</p>