1. A method for executing an operation once work associated with a version of a state object has been completed, the method comprising: receiving the version of the state object at a first stage in a processing pipeline, wherein the version of the state object is associated with a reference count object; determining that the version of the state object is relevant to the first stage; incrementing a counter included in the reference count object; transmitting the version of the state object to a second stage in the processing pipeline; processing work associated with the version of the state object; decrementing the counter; determining that the counter is equal to zero; and in response, executing an operation specified by the reference count object.