Replace scan to a child process
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include <set>
|
||||
#include <sstream>
|
||||
#include <mutex>
|
||||
#include "locations.h"
|
||||
@@ -71,23 +72,23 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<std::string> getUsers()
|
||||
std::set<std::string> getUsers()
|
||||
{
|
||||
std::vector<std::string> ret;
|
||||
std::set<std::string> ret;
|
||||
|
||||
std::lock_guard<std::mutex> lock(mtx);
|
||||
|
||||
for (std::map<std::string, bool>::iterator it = users.begin(); it != users.end(); ++it)
|
||||
{
|
||||
ret.push_back(it->first);
|
||||
ret.insert(it->first);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
std::vector<std::string> getFlaggedUsers()
|
||||
std::set<std::string> getFlaggedUsers()
|
||||
{
|
||||
std::vector<std::string> ret;
|
||||
std::set<std::string> ret;
|
||||
|
||||
std::lock_guard<std::mutex> lock(mtx);
|
||||
|
||||
@@ -95,14 +96,14 @@ public:
|
||||
{
|
||||
if (it->second)
|
||||
{
|
||||
ret.push_back(it->first);
|
||||
ret.insert(it->first);
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool isAnybodyInQueue()
|
||||
bool isAnybodyFlagged()
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(mtx);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user