diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 76c35a52..5e6298b3 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -1,34 +1,30 @@ -# Simple workflow for deploying static content to GitHub Pages name: Deploy static content to Pages on: - # Runs on pushes targeting the default branch push: branches: ["main"] paths: - "docs/**" - ".github/workflows/static.yml" - # Allows you to run this workflow manually from the Actions tab + pull_request: + paths: + - "docs/**" + - ".github/workflows/static.yml" + workflow_dispatch: -# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages permissions: contents: read pages: write id-token: write -# Allow one concurrent deployment concurrency: group: "pages" cancel-in-progress: true jobs: - # Single deploy job since we're just deploying - deploy: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} + build: runs-on: ubuntu-22.04 steps: - name: Install @@ -46,8 +42,16 @@ jobs: - name: Upload artifact uses: actions/upload-pages-artifact@v4 with: - # Upload entire repository path: "docs/public" + + deploy: + needs: build + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-22.04 + steps: - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4 diff --git "a/docs/docs.cn/\344\277\241\345\217\267\344\270\216\344\273\273\345\212\241\347\232\204\345\217\226\346\266\210.md" "b/docs/docs.cn/\344\277\241\345\217\267\344\270\216\344\273\273\345\212\241\347\232\204\345\217\226\346\266\210.md" index 960c0fcc..01c1f654 100644 --- "a/docs/docs.cn/\344\277\241\345\217\267\344\270\216\344\273\273\345\212\241\347\232\204\345\217\226\346\266\210.md" +++ "b/docs/docs.cn/\344\277\241\345\217\267\344\270\216\344\273\273\345\212\241\347\232\204\345\217\226\346\266\210.md" @@ -264,15 +264,15 @@ syncAwait(Task().setLazyLocal(signal.get()).via(ex)); 1. CollectAny:CollectAny会将信号转发给所有子任务,如果收到取消信号,会抛出异常立即返回。 2. CollectAll:CollectAny会将信号转发给所有子任务,即使收到取消信号,自身依然会等待所有子任务执行完毕后正常返回。 3. Yield/SpinLock上锁:如果被取消,会抛出异常。目前暂不支持取消在调度器中排队的任务。 -4. Future:返回值Try中将包含异常。 -4. Sleep: 依赖于调度器是否重写了虚函数`void schedule(Func func, Duration dur, uint64_t schedule_info, Slot *slot = nullptr)`,并正确实现了取消功能。如果未重写该函数,默认实现支持取消Sleep。 +4. Future:返回值`Try`中将包含异常。 +5. Sleep: 依赖于调度器是否重写了虚函数`void schedule(Func func, Duration dur, uint64_t schedule_info, Slot *slot = nullptr)`,并正确实现了取消功能。如果未重写该函数,默认实现支持取消Sleep。 以下IO对象与函数暂未支持取消操作,有待后续完善。 1. Mutex 2. ConditionVariable 3. SharedMutex 4. Latch -6. CountingSemaphore +5. CountingSemaphore ### 自定义Awaiter如何支持取消