<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def __spawn_new_requests(self):
 """Spawn new requests until the max threads option value is reached. Note: If no new requests were spawned and there are no requests in progress the crawler will stop crawling. """


        self.__should_spawn_new_requests = False

        in_progress_count = len(self.queue.get_all(QueueItem.STATUS_IN_PROGRESS))

        while in_progress_count < self.__options.performance.max_threads:
            if self.__spawn_new_request():
                in_progress_count += 1
            else:
                break

        if in_progress_count == 0:
            self.__crawler_stop()