Skip to content

DRAFT: Add example for async runtime #198

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

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

Conversation

pchickey
Copy link
Contributor

@pchickey pchickey commented Aug 18, 2025

Proposed changes

  • First, rename existing async example to tokio. Its still fine to use tokio with ngx, but since this example was written we added an async executor to ngx that uses the nginx event loop, rather than using tokio in another thread.
  • Then, make a copy of the tokio example named async where we remove all use of tokio, and replace it with ngx::async.

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have written my commit messages in the Conventional Commits format.
  • I have read the CONTRIBUTING doc
  • I have added tests (when possible) that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto main
  • I will ensure my PR is targeting the main branch and pulling from my branch from my own fork

@pchickey pchickey force-pushed the pch/add_async_example branch 7 times, most recently from 22fdab4 to a2ecf0c Compare August 18, 2025 21:20
To reduce some confusion. Since this example was introduced, we
introduced a smaller nginx-native async executor directly to ngx
because the windows nmake program doesn't support .PHONY, and therefore
it may reuse stale items from the cache instead of building them
@pchickey pchickey force-pushed the pch/add_async_example branch from 8c315b7 to 0eb092f Compare August 19, 2025 22:46
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.

1 participant