* 通过串行队列提取图标,确保原生调用不并发执行
(iconPath: string)
| 44 | * 通过串行队列提取图标,确保原生调用不并发执行 |
| 45 | */ |
| 46 | function extractIconQueued(iconPath: string): Promise<Buffer> { |
| 47 | const task = extractionQueue.then(() => extractIcon(iconPath)) |
| 48 | // 更新队列尾部,忽略错误不阻塞后续任务 |
| 49 | extractionQueue = task.then( |
| 50 | () => undefined, |
| 51 | () => undefined |
| 52 | ) |
| 53 | return task |
| 54 | } |
| 55 | |
| 56 | /** |
| 57 | * 创建图标 Response |
no test coverage detected