static void *dispatchThreadProc( void *closure ) { mamaDispatcherImpl* impl = (mamaDispatcherImpl*)closure; wInterlocked_set (1, &impl->mIsDispatching); while (wInterlocked_read (&impl->mIsDispatching) && MAMA_STATUS_OK == mamaQueue_dispatch (impl->mQueue)); wInterlocked_set (0, &impl->mIsDispatching); return NULL; }
mama_status qpidBridge_start (mamaQueue defaultEventQueue) { if (NULL == defaultEventQueue) { mama_log (MAMA_LOG_LEVEL_FINER, "qpidBridge_start(): defaultEventQueue is NULL"); return MAMA_STATUS_NULL_ARG; } /* Start the default event queue */ return mamaQueue_dispatch (defaultEventQueue);; }
static void *dispatchThreadProc( void *closure ) { mamaDispatcherImpl* impl = (mamaDispatcherImpl*)closure; impl->mIsDispatching = 1; while (impl->mIsDispatching && !impl->mDestroy && MAMA_STATUS_OK == mamaQueue_dispatch (impl->mQueue)) ; impl->mIsDispatching = 0; if (impl->mQueue) impl->mQueue->mDispatcher = NULL; return NULL; }