Closed buf1024 closed 7 years ago
I can take the patch as is (just removing the commented-out code), but it would be best if you could make a pull request. Helps with giving you credit for the change as well as making my life a little bit easier. :)
Closing as #199 has been merged.
When I want to quit lwan every time, the program waits for secondst. That's because in the
job_thread
function(in file lwan-job.c) makes a system callnanosleep
. That causes the job thread suspend, and wakes up after a few seconds. I think this may be optimized for quick quit.Maybe lwan should use some mechanism to improve the quit speed. I use
pthread_cond_timedwait
to do that. Here is the diff patch.