Multi-threading error
Posted: 11 Dec 2007, 21:48
I am using CADImport in a multi-threaded environment. I use a lock() around the code, which looks something like this:
lock(_objlock)
{
using (CADImage imp = new DWG.DWGImage())
{
// Do stuff, load DWG's, etc
}
}
In spite of this global lock, occasionally I am getting pop-up dialogs on the screen claiming "the number of permitted application instances is exceeded!"
Unfortunately, two things are a problem ...
#1, it's a multi-threaded application, but is still only one application ... shouldn't my license cover this? and
#2, the application has no front-end, and the pop-up is stopping everything else dead in its tracks. Is there any way to keep CADImport from popping up error messages and throw errors instead?
lock(_objlock)
{
using (CADImage imp = new DWG.DWGImage())
{
// Do stuff, load DWG's, etc
}
}
In spite of this global lock, occasionally I am getting pop-up dialogs on the screen claiming "the number of permitted application instances is exceeded!"
Unfortunately, two things are a problem ...
#1, it's a multi-threaded application, but is still only one application ... shouldn't my license cover this? and
#2, the application has no front-end, and the pop-up is stopping everything else dead in its tracks. Is there any way to keep CADImport from popping up error messages and throw errors instead?