OK, in trunk, AsyncWork is now able to get by here, but you need to call Pick instead of Get.
That said, still not 100% sure what is the goal, but if you wanted to process files in parallel, I have cooked up a little example for you for future reference:
#include <Core/Core.h>
using namespace Upp;
CONSOLE_APP_MAIN
{
FindFile ff("c:/xxx/csv/*.csv");
Mutex lock;
int total_lines = 0;
CoDo([&] {
int lines = 0;
for(;;) {
String path;
{
Mutex::Lock __(lock);
while(ff && !ff.IsFile())
ff.Next();
if(!ff) {
total_lines += lines;
return;
}
path = ff.GetPath();
ff.Next();
Cout() << "About to process " << path << "\n";
}
FileIn in(path);
while(!in.IsEof()) {
in.GetLine();
lines++;
}
}
});
Cout() << "Total number of lines is " << total_lines << "\n";
}