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

refactor: rename async_run to background_run & sync_run to main_run #8385

Merged
merged 1 commit into from
Nov 14, 2024

Conversation

hardfist
Copy link
Contributor

@hardfist hardfist commented Nov 9, 2024

Summary

sync_run is actually a async function now, so the sync_run name is kind of awkward, what async_run and sync_run actually means is

  • sync_run: can only be running in main thread(the thread drives task_loop), cause it can exclusively access mutable global state
  • async_run: can be running in background threads
    so I think run_in_main_thread and run_in_backgrund_thread is more accurate, but it's too verbose
    so change sync_run to main_run and async_run to background_run

I'm open to better name cause I don't think these two names are perfect

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@github-actions github-actions bot added the team The issue/pr is created by the member of Rspack. label Nov 9, 2024
Copy link

netlify bot commented Nov 9, 2024

Deploy Preview for rspack canceled.

Name Link
🔨 Latest commit 4ed3ab1
🔍 Latest deploy log https://app.netlify.com/sites/rspack/deploys/672f656c0a0a7e00082c4b20

@hardfist hardfist requested review from h-a-n-a and ahabhgk November 9, 2024 13:38
@hardfist hardfist merged commit bd9b7a0 into main Nov 14, 2024
38 checks passed
@hardfist hardfist deleted the yj/rename-job branch November 14, 2024 05:43
@h-a-n-a h-a-n-a mentioned this pull request Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team The issue/pr is created by the member of Rspack.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants