src/worker.c
/** deliver queued messages to our clients */
deliver queued messages to our clients
deliver queued messages to our clients
void w_deliver(worker_st *p)
{
    message_st *mp;
    while ((mp = w_message_pop(p))) {
        int count;
        sub_search(p->subs, mp, &count, c_deliver);
        mp->not_done[p->index] = 0;
        if (mp->client->worker == p) {
            mp->gc_node.p = mp;
            ASSERT(mp->state == M_STATE_IN_USE);
            queue_push(&p->gc_q, &mp->gc_node);
        }
    }
}
void w_deliver ( worker_st * p ) { message_st * mp ; while ( ( mp = w_message_pop ( p ) ) ) { int count ; sub_search ( p -> subs , mp , & count , c_deliver ) ; mp -> not_done [ p -> index ] = 0 ; if ( mp -> client -> worker == p ) { mp -> gc_node . p = mp ; ASSERT ( mp -> state == M_STATE_IN_USE ) ; queue_push ( & p -> gc_q , & mp -> gc_node ) ; } } }
deliver queued messages to our clients
deliver queued messages to our clients