'Called by network thread'

def save_download_pstate(self, infohash, pstate):

    self.downloads[infohash].pstate_for_restart = pstate
    self.register_task(('save_pstate    %f' % timemod.clock()), self.downloads[infohash].save_resume_data())
