mirror of
https://github.com/janet-lang/janet
synced 2025-11-07 11:03:04 +00:00
Keep single global pthread_cond_t per thread.
This will allow thread/select to be implemented. Also add thread/close and close method to threads.
This commit is contained in:
@@ -945,9 +945,10 @@ typedef struct JanetThread JanetThread;
|
||||
typedef struct JanetChannel JanetChannel;
|
||||
struct JanetChannel {
|
||||
pthread_mutex_t lock;
|
||||
pthread_cond_t cond;
|
||||
pthread_cond_t *rx_cond;
|
||||
JanetBuffer buf;
|
||||
int refCount;
|
||||
int mailboxFlag;
|
||||
};
|
||||
struct JanetThread {
|
||||
JanetChannel *rx;
|
||||
|
||||
Reference in New Issue
Block a user