Skip to content

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

Merged
hardfist merged 1 commit intomainfrom
yj/rename-job
Nov 14, 2024
Merged

refactor: rename async_run to background_run & sync_run to main_run#8385
hardfist merged 1 commit intomainfrom
yj/rename-job

Conversation

@hardfist
Copy link
Copy Markdown
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
@netlify
Copy link
Copy Markdown

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 ahabhgk and h-a-n-a November 9, 2024 13:38
@hardfist hardfist merged commit bd9b7a0 into main Nov 14, 2024
@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