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

MT breaks Lint/Typos rule #473

Closed
Sija opened this issue Oct 8, 2024 · 5 comments · Fixed by #474
Closed

MT breaks Lint/Typos rule #473

Sija opened this issue Oct 8, 2024 · 5 comments · Fixed by #474
Assignees
Labels
Milestone

Comments

@Sija
Copy link
Member

Sija commented Oct 8, 2024

When ameba is built with -Dpreview_mt, the Rule::Lint::Typos rule hangs indefinitely while calling Process.run .

@Sija Sija added the bug label Oct 8, 2024
@Sija Sija added this to the 1.6.2 milestone Oct 8, 2024
@Sija Sija self-assigned this Oct 8, 2024
@Sija Sija closed this as completed in #474 Oct 8, 2024
@straight-shoota
Copy link
Contributor

Any idea why this is happening? I would consider #474 a useful workaround. But it's really odd that this fails. Spawning processes should work in a MT environment just fine.

@Sija
Copy link
Member Author

Sija commented Oct 8, 2024

@straight-shoota Dunno but it could be a bug on the typos-side of things.

@straight-shoota
Copy link
Contributor

When spawning a external processes, the effect of multi-threading shouldn't be much different from single-threaded concurrency. Even within a single thread, multiple processes and be started concurrently and run in parallel.

It might be interesting to observe how many processes run in parallel.

@Sija
Copy link
Member Author

Sija commented Oct 11, 2024

@straight-shoota each file (source) is being run in a separate fiber, so in approximation there should be as much of 'em as the number of crystal source files in the repo. I remember having this issue in multiple repos, not just this one.

@straight-shoota
Copy link
Contributor

Oh, that's a lot then. If they all spawn processes concurrently that can lead to a lot of processes running in parallel. Might be worth to consider some throttling, like running only a hand full of worker fibers per thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants