dify/api/core/virtual_environment/providers
Harry 27781d6b7e refactor: replace threading with gevent primitives for cooperative scheduling
Updated multiple modules to utilize gevent for concurrency, ensuring compatibility with gevent-based WSGI servers. This includes replacing threading.Thread and threading.Event with gevent.spawn and gevent.event.Event, respectively, to prevent blocking and improve performance during I/O operations.

- Refactored SandboxBuilder, Sandbox, CommandFuture, and DockerDemuxer to use gevent.
- Added detailed docstrings explaining the changes and benefits of using gevent primitives.

This change enhances the responsiveness and efficiency of the application in a gevent environment.
2026-01-28 13:29:53 +08:00
..
daytona_sandbox.py refactor(sandbox): remove unused SANDBOX_WORK_DIR constant and update bash command descriptions for clarity 2026-01-12 15:02:30 +08:00
dify_simple_sandbox.py Refactor code structure for improved readability and maintainability 2025-12-30 16:31:34 +08:00
docker_daemon_sandbox.py refactor: replace threading with gevent primitives for cooperative scheduling 2026-01-28 13:29:53 +08:00
e2b_sandbox.py feat: implement keepalive mechanism for E2B sandbox 2026-01-21 20:51:46 +08:00
local_without_isolation.py fix(local-env): replace os.rmdir with shutil.rmtree for directory removal 2026-01-27 15:13:55 +08:00