Thread blocking
Stefan Kalkowski
stefan.kalkowski at ...1...
Wed Apr 28 14:07:20 CEST 2010
On Wednesday, 28. April 2010 13:39:16 Peter Nguyen wrote:
> Hi Stefan,
>
> Thanks for that. I was wondering though, the hanging does occur immediately
> after the first request is received
Yes, because right after you've started the new thread, it gets destructed,
because the main thread leaves the loop-body-scope and thereby clears away
everything (loop-scope locally) initialized on the stack including the
thread-object. This programming error is similar to returning local objects
from functions.
Please, turn line 167 into:
http_thread *thr = http_thread(client);
and see what happens. Nevertheless, this is no good solution, as you
infinitely produce threads without cleaning up.
regards
--
Stefan Kalkowski
Genode Labs Developer
http://genode-labs.com
More information about the users
mailing list