예제 #1
0
파일: queue.c 프로젝트: OpenMAMA/OpenMAMA
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;
}
예제 #2
0
파일: bridge.c 프로젝트: OpenMAMA/OpenMAMA
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);;
}
예제 #3
0
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;
}