![]() |
【转帖】is dwgdirect safe for server side use
is dwgdirect safe for server side use?
is dwgdirect safe for server side use? thanks for a great library. i'm using dwgdirect1.09 in server side code and i'm experiencing problems when multiple threads are instantiating the lib. can i use it in this scenario? if you some notes on what to lookout for i would appreciate this. thanks! /jonas here's the entry point: void parser::run( const tstring& spath, reactor& r ) { class initlib { public: initlib( odstaticrxobject<myservices>* svcs ) { odinitialize( svcs ); } ~initlib() { oduninitialize(); } }; try { odstaticrxobject<myservices> svcs; svcs.disableoutput(true); try { initlib init(& svcs); processdwg( svcs, spath, r ); } catch(oderror& e) { tstring serror; serror = _t("dwgdirect :"); serror += svcs.geterrordescription(e.code()).c_str(); throw wd3::error( serror, e_fail ); //todo fix } } wd3_catch_throw_all( _t("parser::run") ) } solved fyi: i'm stupid... my code calls odinitialize and oduninitialize per thread call and not once per process as stated in the documentation, after changing this everything works. /jonas |
所有的时间均为北京时间。 现在的时间是 11:08 PM. |