diff options
Diffstat (limited to 'rotord/rotord.cpp')
| -rwxr-xr-x | rotord/rotord.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/rotord/rotord.cpp b/rotord/rotord.cpp index 1843c9c..cb106d0 100755 --- a/rotord/rotord.cpp +++ b/rotord/rotord.cpp @@ -145,13 +145,15 @@ HTTPRequestHandler* RotorRequestHandlerFactory::createRequestHandler(const HTTPS if (command.size()) { if (command[0]=="new") { string sID=idGen.create().toString(); - context[sID]=Rotor::Render_context(); - pool.start(context[sID]); + printf("Rotor: starting thread\n"); + manager.start(new Rotor::Render_context(sID)); content="<sID>"+sID+"</sID>\n"; } else if (command[0]=="list") { - for (std::unordered_map<std::string,Rotor::Render_context>::iterator it = context.begin(); it != context.end(); ++it) { - content+="<sID>"+it->first+"</sID>\n"; + std::list < Poco::AutoPtr < Poco::Task > >::iterator it; + it=manager.taskList().begin(); + for (it=manager.taskList().begin();it !=manager.taskList().end();++it) { + content+="<sID>"+(*it)->name()+"</sID>\n"; } } else { |
