-
-
Notifications
You must be signed in to change notification settings - Fork 584
revert code with lock #1217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
revert code with lock #1217
Conversation
PR Compliance Guide 🔍(Compliance updated until commit cf9b7fa)Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label Previous compliance checksCompliance check up to commit 99c3469
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||
PR Code Suggestions ✨Latest suggestions up to cf9b7fa
Previous suggestions✅ Suggestions up to commit 99c3469
|
||||||||||||||||||||||||||||
PR Type
Bug fix, Enhancement
Description
Add exception handling in
Runmethod for lock-based executionSimplify lock acquisition logic by removing
lockAcquiredflagAlways release semaphore in finally block without conditional check
Add thread sleep delay before GIL acquisition for debugging/observation
Diagram Walkthrough
File Walkthrough
PyCodeInterpreter.cs
Enhanced error handling and simplified lock managementsrc/Plugins/BotSharp.Plugin.PythonInterpreter/Services/PyCodeInterpreter.cs
Runmethod to handle exceptions fromInnerRunWithLockand return error messagelockAcquiredflag variable and simplified lock release logicin
InnerRunWithLockunconditional release in finally
Thread.Sleep(100)inCoreRunScriptbefore GIL acquisition fordebugging purposes