- void set_resource(ManagedResource *);
- ManagedResource *get_resource() const { return resource; }
- void sync();
- State get_state() const { return state; }
+ void add_resource(ManagedResource &);
+ void remove_resource(ManagedResource &);
+ private:
+ bool try_remove_resource(ManagedResource &);
+ public:
+ bool sync();
+ bool needs_work() const { return size<capacity; }