Commit e4a552e
Add client disconnect handling and documentation to concurrent streaming
Improves error handling and documentation for concurrent component streaming:
1. Client Disconnect Handling
- Added IOError and Errno::EPIPE exception handling in producer tasks
- Added response.stream.closed? check before expensive operations
- Added exception handling in writer task to stop gracefully on disconnect
- Prevents wasted resources when clients disconnect mid-stream
2. Documentation Enhancements
- Added detailed comments explaining producer-consumer pattern
- Documented ordering guarantees for concurrent streaming
- Clarified that chunks from same component maintain order
- Clarified that chunks from different components may interleave
- Added memory management documentation
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent dca30af commit e4a552e
File tree
1 file changed
+25
-0
lines changed- react_on_rails_pro/lib/react_on_rails_pro/concerns
1 file changed
+25
-0
lines changedLines changed: 25 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
50 | 64 | | |
51 | 65 | | |
52 | 66 | | |
| |||
58 | 72 | | |
59 | 73 | | |
60 | 74 | | |
| 75 | + | |
61 | 76 | | |
| 77 | + | |
62 | 78 | | |
63 | 79 | | |
64 | 80 | | |
| |||
78 | 94 | | |
79 | 95 | | |
80 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
81 | 100 | | |
82 | 101 | | |
83 | 102 | | |
84 | 103 | | |
85 | 104 | | |
86 | 105 | | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
87 | 109 | | |
88 | 110 | | |
89 | 111 | | |
| |||
97 | 119 | | |
98 | 120 | | |
99 | 121 | | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
100 | 125 | | |
101 | 126 | | |
102 | 127 | | |
| |||
0 commit comments