LibThreading: Make Thread names non-optional

This commit is contained in:
Zaggy1024 2026-01-23 15:23:52 -06:00 committed by Gregory Bertilson
parent d2a1d727ac
commit 5b0d6703da

View file

@ -45,11 +45,11 @@ enum class ThreadState : u8 {
class Thread final
: public AtomicRefCounted<Thread> {
public:
static NonnullRefPtr<Thread> construct(ESCAPING Function<intptr_t()> action, StringView thread_name = {})
static NonnullRefPtr<Thread> construct(ESCAPING Function<intptr_t()> action, StringView thread_name)
{
return adopt_ref(*new Thread(move(action), thread_name));
}
static ErrorOr<NonnullRefPtr<Thread>> try_create(ESCAPING Function<intptr_t()> action, StringView thread_name = {})
static ErrorOr<NonnullRefPtr<Thread>> try_create(ESCAPING Function<intptr_t()> action, StringView thread_name)
{
return adopt_nonnull_ref_or_enomem(new (nothrow) Thread(move(action), thread_name));
}