mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:18:11 +00:00
HackStudio: Call Thread::join instead of pthread_join
It's really awkward that HackStudioWidget was calling the pthread API on its LibThread::Thread. Change to calling the new Thread::join call, which returns the information it wants to log.
This commit is contained in:
parent
8d0b4657e7
commit
744322c247
1 changed files with 3 additions and 4 deletions
|
@ -920,11 +920,10 @@ HackStudioWidget::~HackStudioWidget()
|
||||||
{
|
{
|
||||||
if (!m_debugger_thread.is_null()) {
|
if (!m_debugger_thread.is_null()) {
|
||||||
Debugger::the().set_requested_debugger_action(Debugger::DebuggerAction::Exit);
|
Debugger::the().set_requested_debugger_action(Debugger::DebuggerAction::Exit);
|
||||||
void* retval;
|
|
||||||
dbgln("Waiting for debugger thread to terminate");
|
dbgln("Waiting for debugger thread to terminate");
|
||||||
int rc = pthread_join(m_debugger_thread->tid(), &retval);
|
auto rc = m_debugger_thread->join();
|
||||||
if (rc < 0) {
|
if (rc.is_error()) {
|
||||||
perror("pthread_join");
|
warnln("pthread_join: {}", strerror(rc.error().value()));
|
||||||
dbgln("error joining debugger thread");
|
dbgln("error joining debugger thread");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue