Do you have a question?

First Name:
Surname:
Email:
Phone:
Message:
Get Audio Code

Thread Safety
Last Post 25 Apr 2012 03:50 PM by Chris Hafey. 4 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Chris HafeyUser is Offline
Basic Member
Basic Member
Posts:120

--
24 Apr 2012 06:17 AM  

Any guidance on the thread safetyness of the dicom toolkit?  I think I may be having thread safety issues with the JPEG codec - is it thread safe?  (can I decompress images in different threads concurrently?)

Thanks

Steve WranovskyUser is Offline
Veteran Member
Veteran Member
Posts:2107

--
24 Apr 2012 08:53 AM  
In general, instances of the objects in the DICOM toolkit should only be access from one thread at a time. There are a few exceptions, like the the DicomClient/DicomServer and Listener classes that are thread safe and can be accessed from different threads.

In any case, the JPEG codec is using the IJG code underneath. That code has been fairly widely used across the industry, and we have also used it in a threaded environment and haven't seen any issues. There may be something there, be we use it with threads and haven't seen any issues.

Steve
Chris HafeyUser is Offline
Basic Member
Basic Member
Posts:120

--
24 Apr 2012 10:08 AM  
Thanks for the quick response, it is probably my code but I figured I would check to make sure I was using it right first.
Chris HafeyUser is Offline
Basic Member
Basic Member
Posts:120

--
25 Apr 2012 09:43 AM  
I am still having problems with one specific study that is multiframe with JPEG baseline images in it. I am using CC from an ASP.NET MVC application - does anyone know if there is anything special I need to do when hosted under IIS? I am going to put a coarse lock on all access to CC and see if that helps (ugh)
Chris HafeyUser is Offline
Basic Member
Basic Member
Posts:120

--
25 Apr 2012 03:50 PM  
OK I think I figured out my problem - I have an ASP.NET MVC application that uses clear canvas and IIS7 was recycling the application domain after 20 minutes of inactivity which caused CC to lose track of the JPEG codec (DicomCodecRegistry.GetCodec() would start returning null). I am currently working around it by disabling application domain recycling. I know the plugin loading code was reworked a few months back (I am still using a 2.0 SP1 based source tree) so perhaps this is fixed. I also made some changes to the plugin loading code to meet my own needs so I could have broken this somehow too. Anyway, hope others find this useful
You are not authorized to post a reply.

Active Forums 4.1