mirror of https://github.com/ericonr/erm.git
Add comment to try and remove sched_yield().
A cond var might work here, but we need to make sure we aren't keeping other threads from running file operations for no reason.
This commit is contained in:
parent
ff3cbb8471
commit
f1b569a5de
4
remove.c
4
remove.c
|
@ -142,7 +142,9 @@ remove_dir:
|
|||
int n;
|
||||
while ((n = scandir(t.path, &entries, filter_dir, alphasort)) == -1) {
|
||||
if (errno == ENFILE) {
|
||||
/* sleep waiting for a closedir elsewhere */
|
||||
/* sleep waiting for a closedir elsewhere
|
||||
* TODO: try to broadcast when file operations are done so we don't waste CPU
|
||||
* XXX: bad logic - tool now exits in an arbitrary point when the fd limit is lowered */
|
||||
sched_yield();
|
||||
continue;
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue