cherokee / webserver

Cherokee Web Server
GNU General Public License v2.0
568 stars 104 forks source link

create the mutex before creating threads #1274

Closed anson-lo closed 2 years ago

anson-lo commented 2 years ago

Hi, I create a PR to adjust the order of creating mutexes and threads. If the created thread n->thread uses the mutex, it would be a potential bug. My suggestion is to make the code more reliable by slightly adjusting the code.

skinkie commented 2 years ago

Thanks for the effort, I'll test it later today!

anson-lo commented 2 years ago

@skinkie Thanks so much for your checking. I am also sorry for the mistakes I have introduced.

Should I revise my PR (It seems you are revising)?

skinkie commented 2 years ago

Not required, it was just cleaning up spaces, so the 'squashed' request is as small as possible.