Skip to content

Fix #4900: 修复 ManagedProcess#getLines 完成后不会解除锁定的问题 #4913

Merged
Glavo merged 2 commits intoHMCL-dev:mainfrom
Glavo:fix-4900
Dec 3, 2025
Merged

Fix #4900: 修复 ManagedProcess#getLines 完成后不会解除锁定的问题 #4913
Glavo merged 2 commits intoHMCL-dev:mainfrom
Glavo:fix-4900

Conversation

@Glavo
Copy link
Member

@Glavo Glavo commented Dec 3, 2025

No description provided.

Copy link
Contributor

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 PR fixes a critical concurrency bug in the ManagedProcess#getLines method where the ReentrantLock was acquired but never released, potentially causing deadlocks when multiple threads access this method.

  • Wraps the getLines method logic in a try-finally block to ensure the lock is properly released

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

@Glavo Glavo merged commit c321453 into HMCL-dev:main Dec 3, 2025
8 checks passed
@Glavo Glavo deleted the fix-4900 branch December 3, 2025 08:19
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.

2 participants