Skip to content

Instantly share code, notes, and snippets.

@methodmissing
Created September 8, 2009 23:34
Show Gist options
  • Select an option

  • Save methodmissing/183336 to your computer and use it in GitHub Desktop.

Select an option

Save methodmissing/183336 to your computer and use it in GitHub Desktop.
static VALUE
control_block_close(VALUE cb)
{
rb_aiocb_t *cbs = GetCBStruct(cb);
if NIL_P(cbs->io) return Qfalse;
/* Free q'd requests on Darwin */
aio_return(&cbs->cb);
rb_io_close(cbs->io);
cbs->io = Qnil;
cbs->rcb = Qnil;
return Qtrue;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment