Philippe Normand wrote: > I'm now playing with the Python gnomevfs package. But having issues with > gnomevfs.exists, see the attached code. When looking up for a SMB uri > pointing to a dead machine, the whole python process is locked and i don't > understand why. > > So I came up to wonder why the do_get_file_info() function takes so much > time to resolve SMB uris which don't exist. > > Tracing my code, it seems to block on the LOCK_SMB() in do_get_file_info() > function, but i really can't figure out why it locks my everything. In the > gnome-python binding, the GIL seems to be well used.
libsmbclient is not thread safe, and only allows one request to be active at a time. So each request has to be serialized, and that's what LOCK_SMB() does. What's likely is that another previous request is in running in libsmbclient at that point in time. That said, it may also be a bug. I'd suggest editing modules/smb-method.c and remove the '#if 0' around the DEBUG_SMB_ENABLE and DEBUG_SMB_LOCKS defines, and recompile. You should then get copious output that'll help one trace the various requests through the module. Cheers, Nate _______________________________________________ gnome-vfs-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/gnome-vfs-list
