You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PROTOTYPE WIP: Add thread-safe read functions to input files
The fact that OpenEXR read methods (readPixels, readTiles, etc.) all
require a prior call to setFrameBuffer() prevents truly concurrent
reads by multiple threads because the calling application needs to
maintain a mutex that keeps any other threads from reading from the
same file between the two function calls.
This PR is aimed to implement a new set of API calls, variety of
the readPixels et al. that take a `const FrameBuffer&` as parameter
rather than relying on saved state, and thus allows truly concurrent
reads by multiple threads -- if they use these new safe versions,
obviously the old ones continue to be unsafe to use concurrently.
It's a lot of work to do this right! And I'm not aiming to make it
good right now, but only to minimally stake out the API and make it
functional (even if inefficient) so that we are essentially
"reserving" the API just in time for a 3.2 release, and then we can
iterate on improving the implementation underneath in subsequent
patches, without changing APIs or breaking ABI compatibility within
the 3.2 family.
At the moment, I'm just posting a subset of the work as a prototype
so people can see where I'm going with it. I've implemented a simple
design (just lock internally) for a couple classes. So I'm seeking
feedback on which of the following options are preferred:
1. Flesh this out for ALL the classes and relevant methods ASAP in
time for 3.2.
2. Since these are not virtual methods, adding them doesn't actually
break the ABIs, so don't rush this, we can add them (all at once,
or incrementally) in subsequent 3.2.x patch releases.
3. Just hold off on all of it until 3.3.
Signed-off-by: Larry Gritz <[email protected]>
0 commit comments