A flexible implementation of the observer pattern with automatic lifetime management.