mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
Phase 7, Step 4: Move data to MainThread/Shared structs (breaking)
This change completes the migration of FetchTasklet fields to MainThreadData and SharedData structs, eliminating duplicate field storage and clarifying data ownership and thread safety boundaries. Changes: - Removed 27 duplicate fields from FetchTasklet struct - Updated 100+ access sites to use this.main_thread.X or this.shared.X - Main thread fields: promise, global_this, vm, response, streams, abort handling - Shared fields: HTTP client, buffers, result, metadata, ref_count, mutex - Net reduction of 61 lines of code All data now explicitly separated into main-thread-only and thread-safe zones, providing clear boundaries for concurrent access patterns. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in: