Closed GoogleCodeExporter closed 9 years ago
I think that if ctx->queue is a ring, the assertion ctx->sq_head > ctx->sq_tail
should not always be true if the ctx->sq_head is wrapped while the ctx->sq_tail
is not wrapped.
Original comment by andy...@gmail.com
on 30 Dec 2010 at 5:43
I think there is a lack of "volatile" keyword on most ctx fields. These fields
are modified by several threads. Compiler is not aware of that and some
optimization can put some values in register instead of keeping them in ram.
I already observe same behaviour on ctx->nb_thread with an assert when stopping
cleanly.
Original comment by laurent....@gmail.com
on 13 Feb 2011 at 1:22
Pushed
http://code.google.com/p/mongoose/source/detail?r=11b1f767f54f68d7289b6a5e10859c
0c5faed439
Please test
Original comment by valenok
on 15 Feb 2011 at 4:15
With "volatile", it's ok. No more assert triggered. Thx
Original comment by laurent....@gmail.com
on 1 Apr 2011 at 2:59
Original comment by valenok
on 21 Jun 2011 at 11:31
Original issue reported on code.google.com by
andy...@gmail.com
on 30 Dec 2010 at 5:38