Re: [Tutor] os.listdir blocks threads?

2005-10-17 Thread Hugo González Monteverde
Hi, I wrote a quick module for spawning a subprocess and run the function, just as an excercise, after I read your post... It will spawn a subprocess, then pass the serialized return values to the parent. So, if you want to do: lala = os.listdir(".") you do lala = fmg(os.listdir, ".") This w

Re: [Tutor] os.listdir blocks threads?

2005-10-15 Thread Pierre Barbier de Reuille
Hello, first, I believe listdir is implemented so as to block other threads because underlying C functions are *not* thread safe ! So if you try reading two directories in two different threads you may end up with really strange things happening ! For your process problem, if you want to have ful

[Tutor] os.listdir blocks threads?

2005-10-15 Thread Wolfgang Braun
Hello List, I try to read large directories off network shares (samba3,NT) with os.listdir(). The listdir() takes up to 5 minutes and blocks the rest of the program (gui refreshes, ...) The idea now is to put the listdir call into a separate thread so the program can go on doing stuff (see below