polygon-city / citygml-to-obj

Takes a CityGML file and creates an OBJ file for each building
MIT License
18 stars 4 forks source link

Callback fired before all files are written #11

Closed MFGiscad closed 9 years ago

MFGiscad commented 9 years ago

I looked a bit into the source code and noticed that the callback function is called before all files are written. I also noticed that in my case there are 4 workers left, that aren't ready and are not killed before callback() is called.

Also the last few console logs are:

"Finished converting CityGML"
Saved: ../../CityGML/OBJ/DEBY_LOD2_21643111.obj
Saved: ../../CityGML/OBJ/DEBY_LOD2_721486.obj
Saved: ../../CityGML/OBJ/DEBY_LOD2_721487.obj
Saved: ../../CityGML/OBJ/DEBY_LOD2_721488.obj

so the workers haven't finished the saving before callback() is fired.

robhawkes commented 9 years ago

I've pushed 0.1.25 which now waits for all the workers to finish writing files before firing the callback. This has little to no effect on #10 so I'm going to continue digging in that issue. Happy to re-open this one if you find the callback order still isn't correct.