mirror of
https://github.com/janet-lang/janet
synced 2025-11-06 10:33:03 +00:00
Initial working draft of threaded channels.
Introduces close semtantics to channels as well, but otherwise threaded channels behave much like non-threaded channels. They have different marshalling behavior though, and can only send values over by packing and unpacking them. For now, this means only primitive values although this will be expanded. Also missing some implementation for closing threaded channels, and a whole lot of testing. Achtung!, Caveat emptor, here be dragons and bugs.
This commit is contained in:
@@ -1343,7 +1343,7 @@ JANET_API void janet_addtimeout(double sec);
|
||||
JANET_API void janet_ev_inc_refcount(void);
|
||||
JANET_API void janet_ev_dec_refcount(void);
|
||||
|
||||
/* Get last error from a an IO operation */
|
||||
/* Get last error from an IO operation */
|
||||
JANET_API Janet janet_ev_lasterr(void);
|
||||
|
||||
/* Async service for calling a function or syscall in a background thread. This is not
|
||||
@@ -1357,6 +1357,7 @@ typedef struct {
|
||||
int tag;
|
||||
int argi;
|
||||
void *argp;
|
||||
Janet argj;
|
||||
JanetFiber *fiber;
|
||||
} JanetEVGenericMessage;
|
||||
|
||||
@@ -1586,6 +1587,7 @@ JANET_API const JanetKV *janet_struct_find(JanetStruct st, Janet key);
|
||||
/* Table functions */
|
||||
JANET_API JanetTable *janet_table(int32_t capacity);
|
||||
JANET_API JanetTable *janet_table_init(JanetTable *table, int32_t capacity);
|
||||
JANET_API JanetTable *janet_table_init_raw(JanetTable *table, int32_t capacity);
|
||||
JANET_API void janet_table_deinit(JanetTable *table);
|
||||
JANET_API Janet janet_table_get(JanetTable *t, Janet key);
|
||||
JANET_API Janet janet_table_get_ex(JanetTable *t, Janet key, JanetTable **which);
|
||||
|
||||
Reference in New Issue
Block a user