kiss9815 / mongoose

Automatically exported from code.google.com/p/mongoose
MIT License
0 stars 0 forks source link

Deadlock when calling mg_stop and high CPU while #260

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I am using Web server in my project. when you call mg_stop function server he 
closed 2 out of 5 threads. 2 threads stopped in function "consume_socket"  in 
line
"pthread_cond_wait(&ctx->sq_full, &ctx->mutex);"
if add this changes problem be solved

void mg_stop(struct mg_context *ctx) {
  ctx->stop_flag = 1;
  //This line added
  pthread_cond_signal(&ctx->sq_full);

....

What version of the product are you using? On what operating system?

Windows 7
mongoose 3.00 (This error occurs as in the previous version)

Original issue reported on code.google.com by TaLiB300...@gmail.com on 22 Jun 2011 at 12:22

GoogleCodeExporter commented 9 years ago
This could be related or a duplicate of issue 273

Original comment by jcmay...@gmail.com on 12 Aug 2011 at 1:59

GoogleCodeExporter commented 9 years ago

Original comment by valenok on 23 Sep 2012 at 12:56