[*] Shorten LOC of AuOpen.Unix.cpp
This commit is contained in:
parent
648fbea6c1
commit
4f340aae47
@ -14,7 +14,7 @@
|
||||
|
||||
namespace Aurora::Processes
|
||||
{
|
||||
static void UnixOpenAsyncThread(const AuString &uri, bool bType)
|
||||
static void UnixOpenAsyncThread(AuString uri, bool bType)
|
||||
{
|
||||
bool bDirExists {};
|
||||
bool bFileExists {};
|
||||
@ -66,20 +66,7 @@ namespace Aurora::Processes
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO: No, just no.
|
||||
auto thread = AuThreads::ThreadUnique(AuThreads::ThreadInfo(
|
||||
AuMakeShared<AuThreads::IThreadVectorsFunctional>(AuThreads::IThreadVectorsFunctional::OnEntry_t(std::bind(std::bind(&UnixOpenAsyncThread, uri, bType))),
|
||||
AuThreads::IThreadVectorsFunctional::OnExit_t{})
|
||||
));
|
||||
|
||||
if (!thread)
|
||||
{
|
||||
SysPushErrorGeneric("no resource");
|
||||
return;
|
||||
}
|
||||
|
||||
thread->Run();
|
||||
thread->Detach();
|
||||
AuThreads::Spawn(std::bind(&UnixOpenAsyncThread, AuString(uri), bType), true);
|
||||
}
|
||||
|
||||
AUKN_SYM void OpenUri(const AuString &uri)
|
||||
|
Loading…
Reference in New Issue
Block a user