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

Revamp JobQueue into JobExecutor and introduce NativeAsyncJob #4118

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

jedel1043
Copy link
Member

@jedel1043 jedel1043 commented Jan 10, 2025

This changes the API of JobQueue to take a non_exhaustive enum Job, which should avoid breaking changes in the future. Some other changes:

  • Renames JobQueue to JobExecutor.
  • Introduces JobPromise, which is a wrapper around NativeJob but clearly states that the job will push promises forward.
  • Introduces NativeAsyncJob, an equivalent to NativeJob that is Future-compatible.

@jedel1043 jedel1043 added enhancement New feature or request API labels Jan 10, 2025
@jedel1043 jedel1043 added this to the next-release milestone Jan 10, 2025
@jedel1043 jedel1043 requested a review from a team January 10, 2025 09:16
Copy link

Test262 conformance changes

Test result main count PR count difference
Total 50,254 50,254 0
Passed 45,007 45,007 0
Ignored 1,728 1,728 0
Failed 3,519 3,519 0
Panics 0 0 0
Conformance 89.56% 89.56% 0.00%

Copy link
Contributor

@hansl hansl left a comment

Choose a reason for hiding this comment

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

Nice work! I'll have to take a look on my computer but this is the first thing I noticed reading the examples.

examples/src/bin/tokio_event_loop.rs Outdated Show resolved Hide resolved
examples/src/bin/smol_event_loop.rs Outdated Show resolved Hide resolved
@jedel1043 jedel1043 requested a review from hansl January 10, 2025 16:38
@jedel1043 jedel1043 changed the title Introduce NativeAsyncJob Introduce NativeAsyncJob and revamp JobQueue to `JobExecutor Jan 11, 2025
@jedel1043 jedel1043 changed the title Introduce NativeAsyncJob and revamp JobQueue to `JobExecutor Revamp JobQueue into JobExecutor and introduce NativeAsyncJob Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants