A closure that increments a variable on running. More...
#include "worker_test_base.h"
Public Member Functions | |
CountFunction (int *variable) | |
virtual void | Run () |
virtual void | Cancel () |
A closure that increments a variable on running.
virtual void net_instaweb::WorkerTestBase::CountFunction::Cancel | ( | ) | [inline, virtual] |
Informs a the Function that it is being shut down. If this is called, Run() should not be called. This should never be called while a function is running. See also set_quit_requested(), which can be called during Run(), so that Run() implementations can check quit_requested() at their convenience to stop the operation in progress.
Reimplemented from net_instaweb::Function.
virtual void net_instaweb::WorkerTestBase::CountFunction::Run | ( | ) | [inline, virtual] |
Callers must override this to define the action to take when a closure is run. If this is called, Cancel() should not be called. This is a convention that's expected of callers of Function objects, but is not enforced by the Function implementation.
Implements net_instaweb::Function.