Skip to content

Prevent thread pool problems by switching to LongRunning-Task#5

Merged
BoBiene merged 1 commit into
BoBiene:mainfrom
etoensfeldt:bugfix/longrunningtask
Feb 6, 2026
Merged

Prevent thread pool problems by switching to LongRunning-Task#5
BoBiene merged 1 commit into
BoBiene:mainfrom
etoensfeldt:bugfix/longrunningtask

Conversation

@etoensfeldt
Copy link
Copy Markdown
Collaborator

Create "Thread"-Task as LongRunning-Task to prevent default ThreadPool starvation

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request addresses a potential thread pool starvation issue by changing the Thread wrapper class from using Task.Run to Task.Factory.StartNew with TaskCreationOptions.LongRunning. The Thread class is a Java-like thread abstraction used for long-running background operations such as continuous network I/O loops in SMB protocol handlers.

Changes:

  • Modified Thread.Start() to use Task.Factory.StartNew instead of Task.Run
  • Added TaskCreationOptions.LongRunning and TaskScheduler.Default parameters to ensure dedicated thread creation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@BoBiene BoBiene merged commit fead99b into BoBiene:main Feb 6, 2026
9 checks passed
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.

3 participants