我中途研究了一下 appleboy/ssh-action 的用法,想看看它是否支持多台服务器,但最终发现它不符合我的需求。我还查了一下 GitHub Actions 目前是否支持 YAML 锚点。最后我问了 Copilot:“Is this github action code a bit redundant, is there room for optimization?”
实际操作流程: a. 设置通道为非阻塞模式。 b. 将多个通道注册到一个选择器上。 c. 线程调用选择器的 select()方法。 d. 选择器返回已经就绪的通道。 e. 线程对就绪的通道执行 I/O 操作。
A context switch can occur while the kernel is executing a system call on behalf of the user. If the system call blocks because it is waiting for some event to occur, then the kernel can put the current process to sleep and switch to another process. For example, if a system call requires a disk access, the kernel can opt to perform a context switch and run another process instead of waiting for the data to arrive from the disk. Another example is the system call, which is an explicit request to put the calling process to sleep. In general, even if a system call does not block, the kernel can decide to perform a context switch rather than return control to the calling process.
- The maximum number of steps you can within a stage is:
- 10 steps for workspaces on the [Free plan](https://www.atlassian.com/software/bitbucket/pricing).
- 100 steps for workspaces on a [Standard or Premium plan](https://www.atlassian.com/software/bitbucket/pricing).
- Parallel stages are not supported.
- A stage can't include parallel steps.
- A stage can't contain manually triggered steps, but you can configure a stage to be manually triggered.
- A stage can't contain conditional steps, but you can configure a stage to be conditional.
- Disabling artifact downloads inside a stage is not supported.
- Steps can't override any property also set on a stage.
- Partially completed deployment stages can't be continued if another change was subsequently deployed to the same environment.