def reset_state(self):
        """
        All forked dataflows should only be reset **once and only once** in spawned processes.
        Subclasses should call this method with super.
        """
        assert not self._reset_done, "reset_state() was called twice! This violates the API of DataFlow!"
        self._reset_done = True

        # __del__ not guaranteed to get called at exit
        atexit.register(del_weakref, weakref.ref(self))
def reset_state ( self ) : assert not self . _reset_done , "reset_state() was called twice! This violates the API of DataFlow!" self . _reset_done = True atexit . register ( del_weakref , weakref . ref ( self ) )
All forked dataflows should only be reset **once and only once** in spawned processes.
        Subclasses should call this method with super.