Example #1
0
void tee_finish_writer(void)
{
	finishing = 1;
	apr_queue_interrupt_all(tee_global_queue);
	apr_status_t rc;
	apr_thread_join(&rc, writter_thread);
}
Example #2
0
static int queue_interrupt(lua_State *L)
{
  apr_status_t status;
  lua_apr_queue *object;
  
  object = check_queue(L, 1);
  status = apr_queue_interrupt_all(object->handle);

  return push_status(L, status);
}
Example #3
0
APU_DECLARE(apr_status_t) apr_queue_term(apr_queue_t *queue)
{
    apr_status_t rv;

    if ((rv = apr_thread_mutex_lock(queue->one_big_mutex)) != APR_SUCCESS) {
        return rv;
    }

    /* we must hold one_big_mutex when setting this... otherwise,
     * we could end up setting it and waking everybody up just after a 
     * would-be popper checks it but right before they block
     */
    queue->terminated = 1;
    if ((rv = apr_thread_mutex_unlock(queue->one_big_mutex)) != APR_SUCCESS) {
        return rv;
    }
    return apr_queue_interrupt_all(queue);
}
Example #4
0
SWITCH_DECLARE(switch_status_t) switch_queue_interrupt_all(switch_queue_t *queue)
{
	return apr_queue_interrupt_all(queue);
}