Exemplo n.º 1
0
CAMLexport void caml_close_channel(struct channel *channel)
{
  if (channel->refcount > 0) return;
  if (caml_channel_mutex_free != NULL) (*caml_channel_mutex_free)(channel);
  unlink_channel(channel);
  caml_stat_free(channel);
}
Exemplo n.º 2
0
Arquivo: io.c Projeto: bobzhang/ocaml
/* FIXME CAMLexport, but not in io.h  exported for Cash ? */
CAMLexport void caml_finalize_channel(value vchan)
{
  struct channel * chan = Channel(vchan);
  if (--chan->refcount > 0) return;
  if (caml_channel_mutex_free != NULL) (*caml_channel_mutex_free)(chan);
  unlink_channel(chan);
  caml_stat_free(chan);
}