Armin Rigo added the comment: os.scandir() returns an iterable object that should not be used from multiple threads. Doing so can e.g. cause one thread to close the dirp while another thread is still using it. This is likely to crash. Similarly, the test for (!iterator->dirp) at the start of ScandirIterator_iternext() is only done once even if the following loop runs two or three times because of "." or ".." entries.
---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28883> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com