Skip to content

Conversation

anoadragon453
Copy link
Member

@anoadragon453 anoadragon453 commented Oct 8, 2025

Exposes defer_to_threadpool in the Module API, so Synapse modules can run tasks on a thread without colliding with tasks that Synapse itself is trying to schedule.

The motivation for this change is to allow synapse-s3-storage-provider to continue to use its own threadpool while switching its implementation away from make_deferred_yieldable.

Supersedes #19024.

Pull Request Checklist

  • Pull request is based on the develop branch
  • Pull request includes a changelog file. The entry should:
    • Be a short description of your change which makes sense to users. "Fixed a bug that prevented receiving messages from other servers." instead of "Moved X method from EventStore to EventWorkerStore.".
    • Use markdown where necessary, mostly for code blocks.
    • End with either a period (.) or an exclamation mark (!).
    • Start with a capital letter.
    • Feel free to credit yourself, by adding a sentence "Contributed by @github_username." or "Contributed by [Your Name]." to the end of the entry.
  • Code style is correct (run the linters)

@anoadragon453 anoadragon453 marked this pull request as ready for review October 8, 2025 13:11
@anoadragon453 anoadragon453 requested a review from a team as a code owner October 8, 2025 13:11
anoadragon453 added a commit to matrix-org/synapse-s3-storage-provider that referenced this pull request Oct 8, 2025
@anoadragon453 anoadragon453 merged commit e3344dc into develop Oct 9, 2025
41 of 44 checks passed
@anoadragon453 anoadragon453 deleted the anoa/module_api_defer_to_threadpool branch October 9, 2025 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants