This is used by the generator to limit how many file transfers can * be active at once when --remove-source-files is specified. Without * this, sender-side deletions were mostly happening at the end. */
| 1192 | * be active at once when --remove-source-files is specified. Without |
| 1193 | * this, sender-side deletions were mostly happening at the end. */ |
| 1194 | void increment_active_files(int ndx, int itemizing, enum logcode code) |
| 1195 | { |
| 1196 | while (1) { |
| 1197 | /* TODO: tune these limits? */ |
| 1198 | int limit = active_bytecnt >= 128*1024 ? 10 : 50; |
| 1199 | if (active_filecnt < limit) |
| 1200 | break; |
| 1201 | check_for_finished_files(itemizing, code, 0); |
| 1202 | if (active_filecnt < limit) |
| 1203 | break; |
| 1204 | wait_for_receiver(); |
| 1205 | } |
| 1206 | |
| 1207 | active_filecnt++; |
| 1208 | active_bytecnt += F_LENGTH(cur_flist->files[ndx - cur_flist->ndx_start]); |
| 1209 | } |
| 1210 | |
| 1211 | int get_redo_num(void) |
| 1212 | { |
no test coverage detected