[*] Shorten LOC of AuOpen.Unix.cpp
This commit is contained in:
parent
648fbea6c1
commit
4f340aae47
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
namespace Aurora::Processes
|
namespace Aurora::Processes
|
||||||
{
|
{
|
||||||
static void UnixOpenAsyncThread(const AuString &uri, bool bType)
|
static void UnixOpenAsyncThread(AuString uri, bool bType)
|
||||||
{
|
{
|
||||||
bool bDirExists {};
|
bool bDirExists {};
|
||||||
bool bFileExists {};
|
bool bFileExists {};
|
||||||
@ -66,20 +66,7 @@ namespace Aurora::Processes
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: No, just no.
|
AuThreads::Spawn(std::bind(&UnixOpenAsyncThread, AuString(uri), bType), true);
|
||||||
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();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
AUKN_SYM void OpenUri(const AuString &uri)
|
AUKN_SYM void OpenUri(const AuString &uri)
|
||||||
|
Loading…
Reference in New Issue
Block a user