Skip to content
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

checker, cgen: implement fixed array of threads wait() (fix #19016) #19032

Merged
merged 1 commit into from
Aug 1, 2023

Conversation

yuyi98
Copy link
Member

@yuyi98 yuyi98 commented Aug 1, 2023

This PR implement fixed array of threads wait() (fix #19016).

  • Implement fixed array of threads wait().
  • Add test.
fn test() bool {
	return true
}

fn main() {
	threads := [
		spawn test(),
		spawn test(),
	]!

	results := threads.wait()

	println(results)
	assert results == [true, true]
}

PS D:\Test\v\tt1> v run .
[true, true]

@spytheman spytheman merged commit 600f891 into vlang:master Aug 1, 2023
48 checks passed
@yuyi98 yuyi98 deleted the implement_fixed_array_wait branch August 2, 2023 15:24
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.

Can't wait for fixed array of threads
2 participants