Feature #5648
Document that WServer::stop() also calls the blocking WIOService::stop()
Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
04/10/2017
Due date:
% Done:
0%
Estimated time:
Description
WIOService::stop() blocks, as documented, until all tasks, currently running or scheduled to run, are executed. If a task is scheduled with WIOService::schedule() and if this task also schedules the next task (the same task) before finishing, WIOService blocks indefinitely. Since the server is stopped before the IO service, the process gets blocked at WServer::stop(), and at ioService().stop() within WServer::stop(), without a running web server.
IMO a warning should be added to WServer::stop() documentation about this blocking behavior of WIOService::stop().
This issue is observed with wthttpd.