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

fix: recursive export #475

Merged
merged 3 commits into from
Jan 9, 2021
Merged

fix: recursive export #475

merged 3 commits into from
Jan 9, 2021

Conversation

Duologic
Copy link
Member

@Duologic Duologic commented Jan 9, 2021

This partially reverts changes made in #473.

Turns out the workers kept waiting for outCh to be read, this only happens after all 'jobs' have been launched. But as
the limited number of workers kept waiting, no new jobs could be launched.

One of the concerns in #6611 was that a pointer was passed back, this is not the case anymore. The env is now copied
instead of passing along a pointer.

@Duologic Duologic requested review from captncraig and sh0rez January 9, 2021 16:56
cmd/tk/export.go Outdated Show resolved Hide resolved
Comment on lines 23 to -22
jobsCh := make(chan parallelJob)
outCh := make(chan parallelOut)
Copy link
Member

Choose a reason for hiding this comment

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

For public reference:

A simpler fix to the problem would be to use buffered channels. See https://gobyexample.com/worker-pools for an example

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll have a look.

@Duologic Duologic requested review from sh0rez and captncraig January 9, 2021 18:57
@Duologic Duologic merged commit 7bd4c9d into master Jan 9, 2021
@Duologic Duologic deleted the duologic/fix_recursive_export branch January 9, 2021 18:58
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.

3 participants