346 |
(* For each file, we allow only (nranges+5) simultaneous communications, |
(* For each file, we allow only (nranges+5) simultaneous communications, |
347 |
to prevent too many clients from saturing the line for only one file. *) |
to prevent too many clients from saturing the line for only one file. *) |
348 |
let max_nconnected_clients = nranges file in |
let max_nconnected_clients = nranges file in |
349 |
(* lprintf "max_nconnected_clients: %d > %d\n" max_nconnected_clients |
(* lprintf "max_nconnected_clients: %d > %d\n" max_nconnected_clients |
350 |
file.file_nconnected_clients; *) |
file.file_nconnected_clients; *) |
351 |
while file.file_nconnected_clients < max_nconnected_clients do |
while file.file_nconnected_clients < max_nconnected_clients do |
352 |
let (_,c) = Queue.take file.file_clients_queue in |
let (_,c) = Queue.take file.file_clients_queue in |
353 |
(* lprintf "One client\n"; *) |
if !verbose then lprintf "One client\n"; |
354 |
c.client_in_queues <- List2.removeq file c.client_in_queues; |
c.client_in_queues <- List2.removeq file c.client_in_queues; |
355 |
|
|
356 |
|
|