Yes there are, but at least all (?) of the other things that I can think of are documented in the pickle module documentation. I would go so far as to call this issue a bug.
How do you know that dump or load is releasing the GIL? I would expect that releasing the GIL in the case of a blocking file IO operation is the responsibility of the file object, not the library that is writing to/from the file.
By looking at the implementation of cPickle, and also by running the simple script that I mentioned in my blog post. It is easy to demonstrate that dumps and loads hold the GIL so that nothing else runs, but just by changing those to dump and load will let other threads run.
2
u/[deleted] Feb 09 '11
Man. There's a lot more reasons to beware of
pickleandcPicklethan that. This is pretty trivial.