59 |
|
|
60 |
|
GoogleTron::GoogleTron(const cse::String &sitemap, const cse::String &base, const _L<_R<Command> > &commands) : working(true), sitemap(sitemap), base(base), output(hop::BindAll(&GoogleTron::Output, this)) |
61 |
|
{ |
62 |
+ |
api::Apr::CheckError(::apr_initialize()); |
63 |
+ |
|
64 |
|
_foreach (const _L<_R<Command> >, command_, commands) |
65 |
|
if (_R<FileSystemCommand> command = dynamic_cast<FileSystemCommand *>(command_->GetValue())) |
66 |
|
threads.Add(hop::BindAll(&GoogleTron::FileSystem_, this, command)); |
77 |
|
working = false; |
78 |
|
|
79 |
|
output.Join(); |
80 |
+ |
|
81 |
+ |
::apr_terminate(); |
82 |
|
} |
83 |
|
|
84 |
|
int GoogleTron::Output() |