37
43
Collect platform specific bits into cor_platform
on 2:19 PM Oct 20 2025
42
43
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <pthread.h>
typedef struct Future_WatcherSpec Future_WatcherSpec;
typedef enum Future_State {
Future_State_Waiting,
Future_State_Done
} Future_State;
struct Future {
Future_vfptrs_t *vfptrs;
Future_State state;
void *value;
bool canceled;
pthread_mutex_t mutex;
Future_WatcherSpec *watchers;
int nwatchers;
int maxwatchers;
};
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include "cor_platform.h"
typedef struct Future_WatcherSpec Future_WatcherSpec;
typedef enum Future_State {
Future_State_Waiting,
Future_State_Done
} Future_State;
struct Future {
Future_vfptrs_t *vfptrs;
Future_State state;
void *value;
bool canceled;
_Cor_Mutex mutex;
Future_WatcherSpec *watchers;
int nwatchers;
int maxwatchers;
};