Skip to content

Commit 4dfff31

Browse files
authored
fix: ImageInput/ImageOutput did not set per-file threads correctly (#4750)
II and IO were documented as initializing their internal "how many threads to use when reading/writing this particular file" to the global "threads" OIIO attribute. But they did not, they always initialized to 0 ("all the threads") even if the global attribute had been set differently prior to creation of the reader or writer. --------- Signed-off-by: Larry Gritz <lg@larrygritz.com>
1 parent 96c536e commit 4dfff31

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

src/libOpenImageIO/imageinput.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ class ImageInput::Impl {
3535
public:
3636
Impl()
3737
: m_id(++input_next_id)
38+
, m_threads(pvt::oiio_threads)
3839
{
3940
}
4041

src/libOpenImageIO/imageoutput.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ class ImageOutput::Impl {
3838
public:
3939
Impl()
4040
: m_id(++output_next_id)
41+
, m_threads(pvt::oiio_threads)
4142
{
4243
}
4344

0 commit comments

Comments
 (0)