Define lifecycle events, functional events, and describe the worker-in-waiting state.