mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-04 14:01:25 +12:00
Remove thread_ctrl::atexit
It was only a workaround for poor C++11 thread_local support
This commit is contained in:
parent
f2229a5f53
commit
c5676e5649
4 changed files with 16 additions and 57 deletions
|
@ -132,7 +132,7 @@ class thread_ctrl final
|
|||
// Remotely set or caught exception
|
||||
std::exception_ptr m_exception;
|
||||
|
||||
// Thread initial task or atexit task
|
||||
// Thread initial task
|
||||
task_stack m_task;
|
||||
|
||||
// Fixed name
|
||||
|
@ -150,9 +150,6 @@ class thread_ctrl final
|
|||
// Called at the thread end
|
||||
void finalize(std::exception_ptr) noexcept;
|
||||
|
||||
// Add task (atexit)
|
||||
static void _push(task_stack);
|
||||
|
||||
// Internal waiting function, may throw. Infinite value is -1.
|
||||
static bool _wait_for(u64 usec);
|
||||
|
||||
|
@ -241,13 +238,6 @@ public:
|
|||
return g_tls_this_thread;
|
||||
}
|
||||
|
||||
// Register function at thread exit (for the current thread)
|
||||
template<typename F>
|
||||
static inline void atexit(F&& func)
|
||||
{
|
||||
_push(std::forward<F>(func));
|
||||
}
|
||||
|
||||
// Create detached named thread
|
||||
template<typename N, typename F>
|
||||
static inline void spawn(N&& name, F&& func)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue