Skip to content

Instantly share code, notes, and snippets.

@ifknot
Created November 29, 2014 16:53
Show Gist options
  • Save ifknot/49e65b47bfa2d0844490 to your computer and use it in GitHub Desktop.
Save ifknot/49e65b47bfa2d0844490 to your computer and use it in GitHub Desktop.
component implementation
#include "component.h"
namespace fbp {
component* component::operator()() {
try {
return run();
}
catch (que::queue_closed_exception) {
return finally();
}
catch (que::queue_full_exception) {
return on_full();
}
catch (que::queue_empty_exception) {
return on_empty();
}
}
component* component::on_empty() {
return this;
}
component* component::on_full() {
return this;
}
component::~component() {}
component* component::skip = nullptr;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment