code: def _schedule_pending_unlocked(self, state):
          
          while state.jobs and state.unacked < self.window_size_bytes:
              sender, fp = state.jobs[0]
              s = fp.read(self.IO_SIZE)
              if s:
                  state.unacked += len(s)
                  sender.send(mitogen.core.Blob(s))
              else:
                  # File is done. Cause the target's receive loop to exit by
                  # closing the sender, close the file, and remove the job entry.
                  sender.close()
                  fp.close()
                  state.jobs.pop(0)
docs: Consider the pending transfers for a stream, pumping new chunks while
          the unacknowledged byte count is below :attr:`window_size_bytes`. Must
          be called with the FileStreamState lock held.
  
          :param FileStreamState state:
              Stream to schedule chunks for.