RE: Multithreaded TImage

From: Fine, Valeri <fine_at_bnl.gov>
Date: Thu, 12 Apr 2012 01:03:02 +0000


> Hi Jakub,
> TImage implementation was not intended to be thread-safe at the time it was created. If it's
> possible could you send me reproducible example to investigate. Which platform do you use,
> version, script or compiled code? Which methods of TImage you need to be threadsafe.

 [Fine, Valeri]
It seems to me he already said

      " . . .    I use TImage::Open to load images.  . . . 
        . . .
      My code:
           TImage *img = TImage::Open(m_FilePaths[m_DataFileID].c_str());
           unsigned int *data = img->GetArgbArray(); // ... some read operations on the data"
     . . . "

>
> Regards. Valeriy
>
>
> ________________________________________
> From: owner-roottalk_at_root.cern.ch [owner-roottalk_at_root.cern.ch] on behalf of Jakub
> Čermák [jakub_at_jcermak.cz]
> Sent: 10 April 2012 00:50
> To: roottalk_at_root.cern.ch
> Subject: [ROOT] Multithreaded TImage
>
> Hello,
> I've following problém with TImage class. I use TImage::Open to load images. Everything was
> ok until I decided to use more threads, after that is started to fail with "Error in
> <TBufferFile::WriteObjectAny>: ptrClass argument may not be 0". I don't use any other ROOT
> functions and each thread works with its own data, there is no data sharing.
> My code:
> TImage *img = TImage::Open(m_FilePaths[m_DataFileID].c_str());
> unsigned int *data = img->GetArgbArray(); // ... some read operations on the data
>
> So, is the TImage::Open thread-safe? I can't see why it shouldn't be, but I want to be sure. If
> it's really thread-safe, what can be the problem here?
>
> Thanks in advance
>
> Best regards
>
> Jakub Čermák
Received on Thu Apr 12 2012 - 03:03:12 CEST

This archive was generated by hypermail 2.2.0 : Thu Apr 12 2012 - 05:50:01 CEST