Blender 2.49 Thread Safe Problem

Im having a GUI that start another thread, in this thread im monitoring the current selection and print the position of all selected objects on the console. If I select a few (like less than 5), no problem, as soon as I select the whole scene (+100 objects) and move all their location blender just crash reporting some malloc error on the console.

What is the good procedure to implement a “thread safe” approach to get object data from another thread?

Tks!