Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api: Deprecations: missing_math.h, parmalist.h, parallel.h, strutil.h, sysutil.h, thread.h, tiffutils.h, ustring.h, type_traits.h #4338

Merged
merged 11 commits into from
Jul 13, 2024
Merged
Prev Previous commit
Next Next commit
api(thread.h): mark deprecated yield() and this_thread_is_in_pool()
Signed-off-by: Larry Gritz <lg@larrygritz.com>
  • Loading branch information
lgritz committed Jul 13, 2024
commit a1a52b195c4d3b8293feff892677ce4093a3ea71
4 changes: 2 additions & 2 deletions src/include/OpenImageIO/thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ typedef std::lock_guard<std::recursive_timed_mutex> recursive_timed_lock_guard;

/// Yield the processor for the rest of the timeslice.
/// DEPRECATED(2.4): Use std::this_thread::yield() instead.
OIIO_DEPRECATED("Use std::this_thread::yield() [2.4]")
inline void
yield() noexcept
{
Expand Down Expand Up @@ -725,6 +726,7 @@ class OIIO_UTIL_API thread_pool {
/// can be used to limit a pool thread from unadvisedly adding its own
/// subtasks to clog up the pool.
/// DEPRECATED(2.1) -- use is_worker() instead.
OIIO_DEPRECATED("use is_worker [2.1]")
bool this_thread_is_in_pool() const;

/// Register a thread (not already in the thread pool itself) as working
Expand All @@ -737,8 +739,6 @@ class OIIO_UTIL_API thread_pool {
/// the pool?
bool is_worker(std::thread::id id) const;
bool is_worker() const { return is_worker(std::this_thread::get_id()); }
// Non-const versions: DEPRECATED(2.1)
bool is_worker(std::thread::id id);

/// How many jobs are waiting to run? (Use with caution! Can be out of
/// date by the time you look at it.)
Expand Down
8 changes: 0 additions & 8 deletions src/libutil/thread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -449,14 +449,6 @@ thread_pool::is_worker(std::thread::id id) const
}


// DEPRECATED(2.1)
bool
thread_pool::is_worker(std::thread::id id)
{
return m_impl->is_worker(id);
}


bool
thread_pool::very_busy() const
{
Expand Down