ext/iodine/fio.c
/** UNSAFE! publishes a message to a channel, managing the reference counts */
UNSAFE. publishes a message to a channel, managing the reference counts
UNSAFE . publishes a message to a channel managing the reference counts
static void fio_publish2channel(channel_s *ch, fio_msg_internal_s *msg) {
  FIO_LS_EMBD_FOR(&ch->subscriptions, pos) {
    subscription_s *s = FIO_LS_EMBD_OBJ(subscription_s, node, pos);
    if (!s || s->on_message == fio_mock_on_message) {
      continue;
    }
    fio_atomic_add(&s->ref, 1);
    fio_atomic_add(&msg->ref, 1);
    fio_defer_push_task(fio_perform_subscription_callback, s, msg);
  }
  fio_msg_internal_free(msg);
}
static void fio_publish2channel ( channel_s * ch , fio_msg_internal_s * msg ) { FIO_LS_EMBD_FOR ( & ch -> subscriptions , pos ) { subscription_s * s = FIO_LS_EMBD_OBJ ( subscription_s , node , pos ) ; if ( ! s || s -> on_message == fio_mock_on_message ) { continue ; } fio_atomic_add ( & s -> ref , 1 ) ; fio_atomic_add ( & msg -> ref , 1 ) ; fio_defer_push_task ( fio_perform_subscription_callback , s , msg ) ; } fio_msg_internal_free ( msg ) ; }
UNSAFE!
UNSAFE!