1
0
mirror of https://github.com/janet-lang/janet synced 2025-11-02 16:43:02 +00:00

Create pthread threads with detached attribute.

Rather than calling pthread_detach on a default thread.
This commit is contained in:
Calvin Rose
2022-11-11 11:01:59 -06:00
parent 76be8006a4
commit a3a42eebea
2 changed files with 11 additions and 2 deletions

View File

@@ -152,16 +152,19 @@ struct JanetVM {
#ifdef JANET_WINDOWS
void **iocp;
#elif defined(JANET_EV_EPOLL)
pthread_attr_t new_thread_attr;
JanetHandle selfpipe[2];
int epoll;
int timerfd;
int timer_enabled;
#elif defined(JANET_EV_KQUEUE)
pthread_attr_t new_thread_attr;
JanetHandle selfpipe[2];
int kq;
int timer;
int timer_enabled;
#else
pthread_attr_t new_thread_attr;
JanetHandle selfpipe[2];
struct pollfd *fds;
#endif