高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】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
|