示例#1
0
void NotifyFinished(uv_work_t* req)
{
    if (isRunning) 
    {
        if (isAdded) 
        {
            NotifyAdded(notify_item);
        } 
        else 
        {
            NotifyRemoved(notify_item);
        }
    }

    // Delete Item in case of removal
    if(isAdded == false)
    {
        delete notify_item;
    }

    if (isRunning) 
    {
        uv_queue_work(uv_default_loop(), req, NotifyAsync, (uv_after_work_cb)NotifyFinished);
    }
    SignalDeviceHandled();   
}
示例#2
0
static void cbAsync(uv_async_t *handle) {
	if(!isRunning) {
		return;
	}

	if(isAdded) {
		NotifyAdded(currentItem);
	}
	else {
		NotifyRemoved(currentItem);
	}

	// Delete Item in case of removal
	if(isAdded == false) {
		delete currentItem;
	}

	SignalDeviceHandled();
}