Skip to content

Commit 70941cc

Browse files
authored
fix doc deploy (#463)
1 parent 683ae86 commit 70941cc

2 files changed

Lines changed: 18 additions & 14 deletions

File tree

.github/workflows/static.yml

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,30 @@
1-
# Simple workflow for deploying static content to GitHub Pages
21
name: Deploy static content to Pages
32

43
on:
5-
# Runs on pushes targeting the default branch
64
push:
75
branches: ["main"]
86
paths:
97
- "docs/**"
108
- ".github/workflows/static.yml"
119

12-
# Allows you to run this workflow manually from the Actions tab
10+
pull_request:
11+
paths:
12+
- "docs/**"
13+
- ".github/workflows/static.yml"
14+
1315
workflow_dispatch:
1416

15-
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
1617
permissions:
1718
contents: read
1819
pages: write
1920
id-token: write
2021

21-
# Allow one concurrent deployment
2222
concurrency:
2323
group: "pages"
2424
cancel-in-progress: true
2525

2626
jobs:
27-
# Single deploy job since we're just deploying
28-
deploy:
29-
environment:
30-
name: github-pages
31-
url: ${{ steps.deployment.outputs.page_url }}
27+
build:
3228
runs-on: ubuntu-22.04
3329
steps:
3430
- name: Install
@@ -46,8 +42,16 @@ jobs:
4642
- name: Upload artifact
4743
uses: actions/upload-pages-artifact@v4
4844
with:
49-
# Upload entire repository
5045
path: "docs/public"
46+
47+
deploy:
48+
needs: build
49+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
50+
environment:
51+
name: github-pages
52+
url: ${{ steps.deployment.outputs.page_url }}
53+
runs-on: ubuntu-22.04
54+
steps:
5155
- name: Deploy to GitHub Pages
5256
id: deployment
5357
uses: actions/deploy-pages@v4

docs/docs.cn/信号与任务的取消.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,15 +264,15 @@ syncAwait(Task().setLazyLocal(signal.get()).via(ex));
264264
1. CollectAny:CollectAny会将信号转发给所有子任务,如果收到取消信号,会抛出异常立即返回。
265265
2. CollectAll:CollectAny会将信号转发给所有子任务,即使收到取消信号,自身依然会等待所有子任务执行完毕后正常返回。
266266
3. Yield/SpinLock上锁:如果被取消,会抛出异常。目前暂不支持取消在调度器中排队的任务。
267-
4. Future:返回值Try<T>中将包含异常。
268-
4. Sleep: 依赖于调度器是否重写了虚函数`void schedule(Func func, Duration dur, uint64_t schedule_info, Slot *slot = nullptr)`,并正确实现了取消功能。如果未重写该函数,默认实现支持取消Sleep。
267+
4. Future:返回值`Try<T>`中将包含异常。
268+
5. Sleep: 依赖于调度器是否重写了虚函数`void schedule(Func func, Duration dur, uint64_t schedule_info, Slot *slot = nullptr)`,并正确实现了取消功能。如果未重写该函数,默认实现支持取消Sleep。
269269
270270
以下IO对象与函数暂未支持取消操作,有待后续完善。
271271
1. Mutex
272272
2. ConditionVariable
273273
3. SharedMutex
274274
4. Latch
275-
6. CountingSemaphore
275+
5. CountingSemaphore
276276
277277
### 自定义Awaiter如何支持取消
278278

0 commit comments

Comments
 (0)