Пример #1
0
static void CALLBACK PromiseContinuationCallback(JsValueRef task, void *callbackState)
{
    Assert(task != JS_INVALID_REFERENCE);
    Assert(callbackState != JS_INVALID_REFERENCE);
    MessageQueue * messageQueue = (MessageQueue *)callbackState;

    WScriptJsrt::CallbackMessage *msg = new WScriptJsrt::CallbackMessage(0, task);
    messageQueue->Push(msg);
}
Пример #2
0
int Moduleinput(UINT unitid,unsigned short taskclass,unsigned short moduleid,UINT datatype,char * databuff,unsigned long datalen,UINT leave0,UINT leave1,char * leaveV)
{
    LINE_HEAD  data;
    data.unitid = unitid;
    data.taskclass = taskclass;
    data.moduleid = moduleid;
    data.datatype = datatype;
    memcpy(data.databuff,databuff,datalen);
    data.leave0 = leave0;
    data.leave1 = leave1;
    memcpy(data.leaveV,leaveV, sizeof(leaveV));
    data.datalen = datalen;
    MessageChunk *chunk = new MessageChunk(data);
    g_inQueue.Push(chunk);
    return 0;
}