Skip to content

feat(app): add per-process app.state; expand lifespan example (#18) - #57

Merged
ZhuchkaTriplesix merged 2 commits into
devfrom
issue-18-app-state-lifespan
Apr 26, 2026
Merged

ZhuchkaTriplesix merged 2 commits into
devfrom
issue-18-app-state-lifespan

Conversation

@ZhuchkaTriplesix

@ZhuchkaTriplesix ZhuchkaTriplesix commented Apr 26, 2026 •

Copy link
Copy Markdown
Member
  • Expose types.SimpleNamespace on App.state; document in class docstring and rsgi.md
  • rsgi_lifespan_app: ThreadPoolExecutor + asyncio.Semaphore, safe shutdown in rsgi_del
  • test: app.state is a mutable SimpleNamespace; refresh feature.md and PRIORITIES

Closes #18

Summary

  • What this PR does (1–3 sentences).
  • If it closes a ticket: Closes #N (replace N).

Base branch

  • This PR targets dev, not main (unless maintainers asked for a hotfix).

Checklist

  • cargo build (and cargo clippy if you touched Rust)
  • maturin develop + tests as in docs/development.md (e.g. pytest from a clean cwd / installed wheel)
  • No unrelated drive-by refactors; commits are atomic and scoped

Note on .github/ISSUE_BACKLOG/

If you only touch issue template files under .github/ISSUE_BACKLOG/ (not application code), say so in the summary. Prefer a separate PR for backlog-only edits when possible.

- Expose types.SimpleNamespace on App.state; document in class docstring and rsgi.md
- rsgi_lifespan_app: ThreadPoolExecutor + asyncio.Semaphore, safe shutdown in __rsgi_del__
- test: app.state is a mutable SimpleNamespace; refresh feature.md and PRIORITIES

Closes #18
@ZhuchkaTriplesix ZhuchkaTriplesix added this to the v0.2.0 milestone Apr 26, 2026
@ZhuchkaTriplesix ZhuchkaTriplesix self-assigned this Apr 26, 2026

@ZhuchkaTriplesix ZhuchkaTriplesix left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

123

@ZhuchkaTriplesix ZhuchkaTriplesix left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

123

@ZhuchkaTriplesix
ZhuchkaTriplesix merged commit 0f5ac9e into dev Apr 26, 2026
16 checks passed
@ZhuchkaTriplesix
ZhuchkaTriplesix deleted the issue-18-app-state-lifespan branch April 27, 2026 09:17
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.

feat: pass app state / lifespan for shared resources (optional design)

1 participant