ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/GoogleTron/GoogleTron.cpp
(Generate patch)

Comparing GoogleTron/GoogleTron.cpp (file contents):
Revision 715 by douglas, 2006-03-27T02:07:13-08:00 vs.
Revision 717 by douglas, 2006-03-28T22:49:24-08:00

# Line 17 | Line 17
17   #include "Sleep.hpp"
18   #include "Zlib/GzipWriter.hpp"
19  
20 + namespace
21 + {
22 +
23 + static struct Apr
24 + {
25 +        Apr()
26 +        {
27 +                api::Apr::CheckError(::apr_initialize());
28 +        }
29 +
30 +        ~Apr()
31 +        {
32 +                ::apr_terminate();
33 +        }
34 + }
35 + arp;
36 +
37 + }
38 +
39   int Main(const app::Options &options)
40   {
41          cse::String sitemap(_B("sitemap.gz")), base;
# Line 56 | Line 75 | usage: api::Cout << _B("Usage: ") << api
75  
76   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))
77   {
59        api::Apr::CheckError(::apr_initialize());
60
78          _foreach (const _L<_R<Command> >, command_, commands)
79                  if (_R<FileSystemCommand> command = dynamic_cast<FileSystemCommand *>(command_->GetValue()))
80                          threads.Add(hop::BindAll(&GoogleTron::FileSystem_, this, command));
# Line 74 | Line 91 | GoogleTron::~GoogleTron()
91          working = false;
92  
93          output.Join();
77
78        ::apr_terminate();
94   }
95  
96   int GoogleTron::Output()

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines