Function wrapper
fabri8bit opened this issue · 1 comments
fabri8bit commented
Tyler-Hardin commented
Sorry it took so long to get back to you. I've been busy with school and forgot about this.
I think it should be function<bool(const vector<vector<string>>&, int, int, char*, bool,bool )>
.
But, IMO, you're better off using lambda closures to use the bool() version of async. It just looks cleaner using the no argument versions, IMO. Like so:
vector<vector<string>> m(4, vector<string>(10));
thread_pool pool(4);
pool.async([=, &m]() -> bool {
return createFpFromTask(m, end, tmp_thread, fp_location, overwrite, dumpwave);
});
Disclaimer: I didn't test this. There might be a compiler error to work around.