[PR #23149] [CLOSED] enh: Set the default executor for asyncio based on THREAD_POOL_SIZE #50100

Closed
opened 2026-04-30 02:39:18 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/23149
Author: @EntropyYue
Created: 3/27/2026
Status: Closed

Base: devHead: enh/default-executor


📝 Commits (1)

  • 066adb3 enh: Set the default executor for asyncio based on THREAD_POOL_SIZE

📊 Changes

1 file changed (+9 additions, -0 deletions)

View changed files

📝 backend/open_webui/main.py (+9 -0)

📄 Description

Changelog Entry

Description

  • This repository heavily utilizes asyncio.to_thread and only has a small amount of anyio.to_thread. Initially, THREAD_POOL_SIZE only increased the thread pool size of anyio. This pull request enables the thread pool executor of asyncio to be configured by this environment variable

Added

  • Set the default executor for asyncio based on THREAD_POOL_SIZE

Contributor License Agreement

Note

Deleting the CLA section will lead to immediate closure of your PR and it will not be merged in.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/23149 **Author:** [@EntropyYue](https://github.com/EntropyYue) **Created:** 3/27/2026 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `enh/default-executor` --- ### 📝 Commits (1) - [`066adb3`](https://github.com/open-webui/open-webui/commit/066adb3fc97b768175c1969b5f06a4dea71e8763) enh: Set the default executor for asyncio based on THREAD_POOL_SIZE ### 📊 Changes **1 file changed** (+9 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/main.py` (+9 -0) </details> ### 📄 Description <!-- ⚠️ CRITICAL CHECKS FOR CONTRIBUTORS (READ, DON'T DELETE) ⚠️ 1. Target the `dev` branch. PRs targeting `main` will be automatically closed. 2. Do NOT delete the CLA section at the bottom. It is required for the bot to accept your PR. --> # Changelog Entry ### Description - This repository heavily utilizes asyncio.to_thread and only has a small amount of anyio.to_thread. Initially, THREAD_POOL_SIZE only increased the thread pool size of anyio. This pull request enables the thread pool executor of asyncio to be configured by this environment variable ### Added - Set the default executor for asyncio based on THREAD_POOL_SIZE ### Contributor License Agreement <!-- 🚨 DO NOT DELETE THE TEXT BELOW 🚨 Keep the "Contributor License Agreement" confirmation text intact. Deleting it will trigger the CLA-Bot to INVALIDATE your PR. Your PR will NOT be reviewed or merged until you check the box below confirming that you have read and agree to the terms of the CLA. --> - [ ] By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](https://github.com/open-webui/open-webui/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms. > [!NOTE] > Deleting the CLA section will lead to immediate closure of your PR and it will not be merged in. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-30 02:39:18 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#50100