Skip to content

Commit

Permalink
Revert "Erase any dangling error messages when objects that report er…
Browse files Browse the repository at this point in the history
…rors are destroyed."

This reverts commit d7e1afe.

Signed-off-by: Chris Kulla <[email protected]>
  • Loading branch information
fpsunflower committed Apr 12, 2024
1 parent ab60908 commit fd2db6e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 25 deletions.
7 changes: 1 addition & 6 deletions src/libOpenImageIO/imageinput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,7 @@ ImageInput::ImageInput()



ImageInput::~ImageInput()
{
// Erase any leftover errors from this thread
// TODO: can we clear other threads' errors?
input_error_messages.erase(this);
}
ImageInput::~ImageInput() {}



Expand Down
7 changes: 1 addition & 6 deletions src/libOpenImageIO/imageoutput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,7 @@ ImageOutput::ImageOutput()



ImageOutput::~ImageOutput()
{
// Erase any leftover errors from this thread
// TODO: can we clear other threads' errors?
output_error_messages.erase(this);
}
ImageOutput::~ImageOutput() {}



Expand Down
3 changes: 0 additions & 3 deletions src/libtexture/imagecache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1722,9 +1722,6 @@ ImageCacheImpl::~ImageCacheImpl()
spin_lock lock(m_perthread_info_mutex);
m_all_perthread_info.clear();
}
// Erase any leftover errors from this thread
// TODO: can we clear other threads' errors?
imcache_error_messages.erase(this);
}


Expand Down
14 changes: 4 additions & 10 deletions src/libtexture/texturesys.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -351,17 +351,8 @@ TextureSystemImpl::init()
}


static thread_local tsl::robin_map<const TextureSystemImpl*, std::string>
txsys_error_messages;


TextureSystemImpl::~TextureSystemImpl()
{
printstats();
// Erase any leftover errors from this thread
// TODO: can we clear other threads' errors?
txsys_error_messages.erase(this);
}
TextureSystemImpl::~TextureSystemImpl() { printstats(); }



Expand Down Expand Up @@ -902,6 +893,9 @@ TextureSystemImpl::get_texels(TextureHandle* texture_handle_,
return ok;
}

static thread_local tsl::robin_map<const TextureSystemImpl*, std::string>
txsys_error_messages;

bool
TextureSystemImpl::has_error() const
{
Expand Down

0 comments on commit fd2db6e

Please sign in to comment.