diff options
| author | Comment <tim@gray.(none)> | 2013-02-24 23:24:18 +0000 |
|---|---|---|
| committer | Comment <tim@gray.(none)> | 2013-02-24 23:24:18 +0000 |
| commit | d5193b058ca06db9bda772ccdf49a8c4976c7274 (patch) | |
| tree | f555499bf462c2b0e1ea0f10b8a21035f1e1e091 /rotord/rotord.cpp | |
| parent | 9de16e3435b0e6fd14af991db278717387d676d3 (diff) | |
working threading
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 { |
