Skip to content

[concurrency] Task cancellation and deadlines #34459

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 3, 2020

Conversation

ktoso
Copy link
Contributor

@ktoso ktoso commented Oct 27, 2020

rdar://70141994

Work in progress adding API stubs for task cancellation and deadlines.

Not all of the API is fleshed out here, and we may need to discuss the general usage patterns still a bit.

(Depends on #34391 which can be merged at will. Merged and rebased)

@ktoso ktoso force-pushed the wip-tasks-deadlines-and-nurseries branch 3 times, most recently from 7067f05 to 9345850 Compare October 27, 2020 13:43
@ktoso ktoso force-pushed the wip-tasks-deadlines-and-nurseries branch from 9345850 to 91316bd Compare October 27, 2020 22:44
@ktoso ktoso marked this pull request as draft October 27, 2020 22:44
@ktoso ktoso force-pushed the wip-tasks-deadlines-and-nurseries branch 2 times, most recently from 0a7a422 to 9285f3f Compare October 28, 2020 05:45
@ktoso ktoso changed the title [concurrency] Task cancellation [concurrency] Task cancellation and deadlines Oct 28, 2020
@ktoso ktoso force-pushed the wip-tasks-deadlines-and-nurseries branch from 9285f3f to 145850e Compare October 28, 2020 09:03
@ktoso ktoso marked this pull request as ready for review October 28, 2020 09:04
@ktoso ktoso force-pushed the wip-tasks-deadlines-and-nurseries branch from 145850e to 6d36727 Compare October 28, 2020 10:07
@ktoso
Copy link
Contributor Author

ktoso commented Oct 28, 2020

@swift-ci please smoke test

@ktoso ktoso force-pushed the wip-tasks-deadlines-and-nurseries branch 7 times, most recently from 16e20c9 to 6b3c04c Compare October 29, 2020 13:11
@ktoso
Copy link
Contributor Author

ktoso commented Oct 29, 2020

@swift-ci please test

@ktoso ktoso force-pushed the wip-tasks-deadlines-and-nurseries branch from 6b3c04c to 5516de9 Compare October 30, 2020 02:50
@DougGregor
Copy link
Member

@swift-ci please smoke test

Copy link
Member

@DougGregor DougGregor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks! We'll need to get some builtins wired up to get access to the task.

@ktoso
Copy link
Contributor Author

ktoso commented Oct 30, 2020

There's a failure but no way it's related to this PR:

15:08:18 ******************** TEST 'Swift(linux-x86_64) :: Sema/type_checker_crashers_fixed/rdar27830834.swift' FAILED ********************
15:08:18 Script:
15:08:18 --
15:08:18 : 'RUN: at line 1';   /home/buildnode/jenkins/workspace/swift-PR-Linux-smoke-test/branch-main/buildbot_linux/swift-linux-x86_64/bin/swift-frontend -target x86_64-unknown-linux-gnu  -module-cache-path /home/buildnode/jenkins/workspace/swift-PR-Linux-smoke-test/branch-main/buildbot_linux/swift-linux-x86_64/swift-test-results/x86_64-unknown-linux-gnu/clang-module-cache -swift-version 4  -ignore-module-source-info  -typo-correction-limit 10  /home/buildnode/jenkins/workspace/swift-PR-Linux-smoke-test/branch-main/swift/validation-test/Sema/type_checker_crashers_fixed/rdar27830834.swift -typecheck
15:08:18 --
15:08:18 Exit Code: 1
15:08:18 
15:08:18 Command Output (stderr):
15:08:18 --
15:08:18 
/home/buildnode/jenkins/workspace/swift-PR-Linux-smoke-test/branch-main/swift/validation-test/Sema/type_checker_crashers_fixed/rdar27830834.swift:4:15: error: type 'Dictionary<String, String>.Element' (aka '(key: String, value: String)') cannot conform to 'Hashable'
15:08:18 _ = "\(d.map{ [$0 : $0] })"
15:08:18               ^
15:08:18 /home/buildnode/jenkins/workspace/swift-PR-Linux-smoke-test/branch-main/swift/validation-test/Sema/type_checker_crashers_fixed/rdar27830834.swift:4:15: note: only concrete types such as structs, enums and classes can conform to protocols
15:08:18 _ = "\(d.map{ [$0 : $0] })"
15:08:18               ^
15:08:18 /home/buildnode/jenkins/workspace/swift-PR-Linux-smoke-test/branch-main/swift/validation-test/Sema/type_checker_crashers_fixed/rdar27830834.swift:4:15: note: required by generic struct 'Dictionary' where 'Key' = 'Dictionary<String, String>.Element' (aka '(key: String, value: String)')
15:08:18 _ = "\(d.map{ [$0 : $0] })"

@ktoso ktoso force-pushed the wip-tasks-deadlines-and-nurseries branch 2 times, most recently from a795fdf to 38ca92e Compare November 2, 2020 07:26
@ktoso
Copy link
Contributor Author

ktoso commented Nov 2, 2020

@swift-ci please smoke test

@ktoso ktoso force-pushed the wip-tasks-deadlines-and-nurseries branch 2 times, most recently from 09974ca to a7beebe Compare November 2, 2020 07:43
@ktoso
Copy link
Contributor Author

ktoso commented Nov 2, 2020

@swift-ci please smoke test


More unrelated failures...

/Users/buildnode/jenkins/workspace/swift-PR-osx-smoke-test/branch-main/llbuild/tests/Ninja/Build/incremental.ninja:23:18: error: CHECK-INITIAL: expected string not found in input
18:46:55 # CHECK-INITIAL: [1/{{.*}}] "cp input-2 output-2"
18:46:55                  ^
18:46:55 /Users/buildnode/jenkins/workspace/swift-PR-osx-smoke-test/branch-main/buildbot_incremental/llbuild-macosx-x86_64/tests/Ninja/Build/Output/incremental.ninja.tmp1.out:1:1: note: scanning from here
18:46:55 llbuild: Entering directory `/Users/buildnode/jenkins/workspace/swift-PR-osx-smoke-test/branch-main/buildbot_incremental/llbuild-macosx-x86_64/tests/Ninja/Build/Output/incremental.ninja.tmp.build'
18:46:55 ^
18:46:55 /Users/buildnode/jenkins/workspace/swift-PR-osx-smoke-test/branch-main/buildbot_incremental/llbuild-macosx-x86_64/tests/Ninja/Build/Output/incremental.ninja.tmp1.out:3:1: note: possible intended match here
18:46:55 [2/3] "cp input-2 output-2"
18:46:55 ^
18:46:55 
18:46:55 Input file: /Users/buildnode/jenkins/workspace/swift-PR-osx-smoke-test/branch-main/buildbot_incremental/llbuild-macosx-x86_64/tests/Ninja/Build/Output/incremental.ninja.tmp1.out
18:46:55 Check file: /Users/buildnode/jenkins/workspace/swift-PR-osx-smoke-test/branch-main/llbuild/tests/Ninja/Build/incremental.ninja
18:46:55 
18:46:55 -dump-input=help explains the following input dump.
18:46:55 
18:46:55 Input was:
18:46:55 <<<<<<
18:46:55             1: llbuild: Entering directory `/Users/buildnode/jenkins/workspace/swift-PR-osx-smoke-test/branch-main/buildbot_incremental/llbuild-macosx-x86_64/tests/Ninja/Build/Output/incremental.ninja.tmp.build'
18:46:55 check:23'0     X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
18:46:55             2: [1/3] "cp input-1 output-1"
18:46:55 check:23'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~
18:46:55             3: [2/3] "cp input-2 output-2"
18:46:55 check:23'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~
18:46:55 check:23'1     ?                           possible intended match
18:46:55             4: [3/3] "cat output-1 output-2 > output"
18:46:55 check:23'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18:46:55 >>>>>>
18:46:55 
18:46:55 error: command failed with exit status: 1

@ktoso ktoso force-pushed the wip-tasks-deadlines-and-nurseries branch from a7beebe to 1b3710a Compare November 2, 2020 09:10
@ktoso ktoso force-pushed the wip-tasks-deadlines-and-nurseries branch from 1b3710a to 27d734a Compare November 2, 2020 12:02
@ktoso
Copy link
Contributor Author

ktoso commented Nov 2, 2020

@swift-ci please smoke test

@ktoso ktoso merged commit d2fb6ac into swiftlang:main Nov 3, 2020
@ktoso ktoso deleted the wip-tasks-deadlines-and-nurseries branch November 3, 2020 01:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants