()
| 100 | * 当快速扫描页面,判断是否需要暂停扫描时使用 |
| 101 | */ |
| 102 | export function canAcceptMoreTasks(): boolean { |
| 103 | // 如果等待队列太长,返回false表示需要暂停扫描 |
| 104 | const MAX_QUEUE_LENGTH = getMaxConcurrentTranslations() * 3; |
| 105 | return pendingTranslations.length < MAX_QUEUE_LENGTH; |
| 106 | } |
nothing calls this directly
no test coverage detected