Commit 6ce863c
authored
server: prevent data race from HTTP threads (ggml-org#18263)
* server: prevent data race from HTTP threads
* fix params
* fix default_generation_settings
* nits: make handle_completions_impl looks less strange
* stricter const
* fix GGML_ASSERT(idx < states.size())
* move index to be managed by server_response_reader
* http: make sure req & res lifecycle are tied together
* fix compile
* fix index handling buggy
* fix data race for lora endpoint
* nits: fix shadow variable
* nits: revert redundant changes
* nits: correct naming for json_webui_settings1 parent 3997c78 commit 6ce863c
11 files changed
Lines changed: 459 additions & 366 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
219 | | - | |
| 219 | + | |
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
| 118 | + | |
| 119 | + | |
128 | 120 | | |
129 | 121 | | |
130 | 122 | | |
131 | 123 | | |
132 | 124 | | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
| 125 | + | |
138 | 126 | | |
139 | 127 | | |
140 | 128 | | |
| |||
1435 | 1423 | | |
1436 | 1424 | | |
1437 | 1425 | | |
1438 | | - | |
| 1426 | + | |
1439 | 1427 | | |
1440 | 1428 | | |
1441 | 1429 | | |
| |||
1445 | 1433 | | |
1446 | 1434 | | |
1447 | 1435 | | |
1448 | | - | |
| 1436 | + | |
| 1437 | + | |
| 1438 | + | |
| 1439 | + | |
| 1440 | + | |
| 1441 | + | |
1449 | 1442 | | |
1450 | 1443 | | |
1451 | 1444 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
111 | | - | |
112 | | - | |
| 110 | + | |
113 | 111 | | |
114 | 112 | | |
115 | 113 | | |
| |||
325 | 323 | | |
326 | 324 | | |
327 | 325 | | |
| 326 | + | |
328 | 327 | | |
329 | 328 | | |
330 | 329 | | |
| |||
0 commit comments