mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-12 09:48:37 +12:00
Emu: Add more info to BlockingCallFromMainThread
This commit is contained in:
parent
efea3aa385
commit
8a87dc63b1
2 changed files with 10 additions and 3 deletions
|
@ -179,7 +179,7 @@ void Emulator::CallFromMainThread(std::function<void()>&& func, atomic_t<u32>* w
|
|||
m_cb.call_from_main_thread(std::move(final_func), wake_up);
|
||||
}
|
||||
|
||||
void Emulator::BlockingCallFromMainThread(std::function<void()>&& func) const
|
||||
void Emulator::BlockingCallFromMainThread(std::function<void()>&& func, u32 line, u32 col, const char* file, const char* fun) const
|
||||
{
|
||||
atomic_t<u32> wake_up = 0;
|
||||
|
||||
|
@ -187,7 +187,10 @@ void Emulator::BlockingCallFromMainThread(std::function<void()>&& func) const
|
|||
|
||||
while (!wake_up)
|
||||
{
|
||||
ensure(thread_ctrl::get_current());
|
||||
if (!thread_ctrl::get_current())
|
||||
{
|
||||
fmt::throw_exception("Current thread null while calling BlockingCallFromMainThread from %s", src_loc{line, col, file, fun});
|
||||
}
|
||||
wake_up.wait(0);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue