1
0
forked from Alepha/Alepha

Create thread context for the main thread.

We probably should also do it for any random thread... but this
mostly would be to prevent crashes... as there's no Alepha thread
object associated with the
This commit is contained in:
2023-11-16 03:10:39 -05:00
parent 7b33b727bf
commit e62a24b1ab

View File

@ -90,6 +90,11 @@ namespace Alepha::Hydrogen::detail::Thread_m
state()->interruption_point();
}
static auto init= Utility::enroll <=[]
{
state()= std::make_shared< ThreadState >();
};
struct Thread::Impl
{
std::thread thr;