ObjectARX
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

AModeler library and thread safety

2 REPLIES 2
Reply
Message 1 of 3
adi.hodos
574 Views, 2 Replies

AModeler library and thread safety

Hello. I want to know if the AModeler library is thread safe (the documentation says nothing about this). Inspecting the headers, I found a bunch of global variables used for floating point comparisons, so these are not thread safe (files epsilon.h, global.h). Are the member functions of the classes and the rest of the non-member functions in the library reentrant ?

2 REPLIES 2
Message 2 of 3
fenton.webb
in reply to: adi.hodos

Sorry, none of our libs are thread safe, nor is AutoCAD itself.




Fenton Webb
AutoCAD Engineering
Autodesk

Message 3 of 3
henrik.vallgren
in reply to: adi.hodos

I've written my own multithreaded version of AModeler (QModeler) and not even things like plane/plane intersection inside the AcGe library supported multithreading. I had to rewrite everything from scratch, with the exception of points, vectors and matrices. But as long as you stay away from ObjectARX functionality - it works perfectly. My guess is that there are small memory allocators that doesn't support multithreading.

 

I've come to associate "const" with multithreading: as long as you don't modify anything - multithreading is safe. I wonder of it's possible to open ARX objects (from multiple threads) for read - as long as one never upgrades them to write.

 

Finally, a wish list item for ARX: if I open an object for read - I'd like to open a const pointer, e.g. "const AcDbLine *line". Then, the compiler could help me find const correctness bugs that today are found when running an application.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost