Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
방법: 콜백 제출
SubmitCallbacks
void CALLBACK SampleCompletionCallback(void*, bool cancel) { printf("Completion invoked on thread %d. Cancel? %d.\r\n", GetCurrentThreadId(), cancel); } void CALLBACK SampleWorkCallback(void* context, bool cancel) { printf("Worker invoked on thread %d. Cancel? %d.\r\n", GetCurrentThreadId(), cancel); XTaskQueueHandle queueFromContext = static_cast<XTaskQueueHandle>(context); HRESULT hrCompletion = XTaskQueueSubmitCallback( queueFromContext, XTaskQueuePort::Completion, nullptr, SampleCompletionCallback); if (FAILED(hrCompletion)) { printf("Error 0x%x submitting completion.\r\n", hrCompletion); } } void SubmitCallbacks(XTaskQueueHandle queue) { HRESULT hrWork = XTaskQueueSubmitCallback( queue, XTaskQueuePort::Work, queue, SampleWorkCallback); if (FAILED(hrWork)) { printf("Error 0x%x submitting work.\r\n", hrWork); } }
관련 항목
이 페이지가 도움이 되었나요?