Asynchronous file reading


Panda3d’s manual says :

Actually I use read() from direct.stdpy.file but it seems that it block my threads. Somethings special to enable somewhere ?

In 1.7.2, you need to use Panda threads (import direct.stdpy.threading), not Python threads (import threading). And there are some other implications that you have to observe; for instance, you have to call Thread.considerYield() from time to time if your thread is going to spend a lot of time in a tight computation.

In 1.8.0, you may use either threading interface. However, you do have to be aware of Python’s own limitations with regards to threading.