Skip to content

Conversation

@igorkorsukov
Copy link
Contributor

No description provided.

@igorkorsukov igorkorsukov force-pushed the audio/change_api_norestart branch from 28b3df6 to 8852934 Compare November 10, 2025 12:37
//! Channels allow 10 threads by default. Here we're increasing that to the maximum...
//! If this is not enough, then we need to make sure that the callback is called in one thread,
//! or use something else here instead of channels, some kind of queues.
const int _max_threads = 100;
Copy link
Member

Choose a reason for hiding this comment

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

I already encountered a "thread pool exhausted" even without this PR
Scherm­afbeelding 2025-11-10 om 14 53 14
On my machine, the TaskScheduler already has 7 threads, but that still means it's currently already used by three other threads, for which I don't really have an explanation

It would be great if we could somehow lift the restriction of a fixed maximum number of threads. We can keep bumping the number, but that doesn't feel entirely safe to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have no idea yet how to make an unlimited number without a mutex.
But I think we can reclaim unused ones.
So, the "sender thread" should be freed at some point, or reused.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

or just don't use channels for this place... but use a pure queue

@igorkorsukov
Copy link
Contributor Author

oops... I was cleaning my fork and deleted this branch... I'll restore it.

@igorkorsukov
Copy link
Contributor Author

replaced by #30989

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.

4 participants