LibThreading: Make Thread names non-optional
This commit is contained in:
parent
d2a1d727ac
commit
5b0d6703da
1 changed files with 2 additions and 2 deletions
|
|
@ -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));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue