Loading...
Searching...
No Matches
js_thread.h
1#pragma once
2
3#ifdef __cplusplus
4extern "C" {
5#endif
6
7typedef struct JsThread JsThread;
8
9typedef enum {
10 JsThreadEventDone,
11 JsThreadEventError,
12 JsThreadEventPrint,
13 JsThreadEventErrorTrace,
14} JsThreadEvent;
15
16typedef void (*JsThreadCallback)(JsThreadEvent event, const char* msg, void* context);
17
18JsThread* js_thread_run(const char* script_path, JsThreadCallback callback, void* context);
19
20void js_thread_stop(JsThread* worker);
21
22#ifdef __cplusplus
23}
24#endif
Definition js_thread.c:16