Class: EIO::Request

Inherits:
Object
  • Object
show all
Defined in:
ext/eio/eio_ext.c

Constant Summary collapse

OPEN =
INT2NUM(EIO_OPEN)
CLOSE =
INT2NUM(EIO_CLOSE)
READ =
INT2NUM(EIO_READ)
WRITE =
INT2NUM(EIO_WRITE)
READAHEAD =
INT2NUM(EIO_READAHEAD)
SENDFILE =
INT2NUM(EIO_SENDFILE)
STAT =
INT2NUM(EIO_STAT)
TRUNCATE =
INT2NUM(EIO_TRUNCATE)
FTRUNCATE =
INT2NUM(EIO_FTRUNCATE)
CHMOD =
INT2NUM(EIO_CHMOD)
FCHMOD =
INT2NUM(EIO_FCHMOD)
CHOWN =
INT2NUM(EIO_CHOWN)
FCHOWN =
INT2NUM(EIO_FCHOWN)
SYNC =
INT2NUM(EIO_SYNC)
FSYNC =
INT2NUM(EIO_FSYNC)
FDATASYNC =
INT2NUM(EIO_FDATASYNC)
INT2NUM(EIO_UNLINK)
RMDIR =
INT2NUM(EIO_RMDIR)
MKDIR =
INT2NUM(EIO_MKDIR)
RENAME =
INT2NUM(EIO_RENAME)
READDIR =
INT2NUM(EIO_READDIR)
INT2NUM(EIO_LINK)
INT2NUM(EIO_SYMLINK)
INT2NUM(EIO_READLINK)

Instance Method Summary collapse

Instance Method Details

#cancelnil

Attempt to cancel an in flight libeio request - no guarantees.

Returns:

  • (nil)


1264
1265
1266
1267
1268
1269
1270
# File 'ext/eio/eio_ext.c', line 1264

static VALUE
rb_eio_req_cancel(VALUE obj)
{
    GetRequest(obj);
    eio_cancel(req);
    return Qnil;
}

#complete?Boolean

True if the Ruby callback for this request already fired.

Returns:

  • (Boolean)


1279
1280
1281
1282
1283
1284
# File 'ext/eio/eio_ext.c', line 1279

static VALUE
rb_eio_req_complete_p(VALUE obj)
{
    GetRequest(obj);
    return (req->complete == 1) ? Qtrue : Qfalse;
}

#errnoFixnum

Request error number, if any.

Returns:

  • (Fixnum)


1222
1223
1224
1225
1226
1227
# File 'ext/eio/eio_ext.c', line 1222

static VALUE
rb_eio_req_errno(VALUE obj)
{
    GetRequest(obj);
    return INT2NUM(req->errorno);
}

#priorityFixnum

Request priority

Returns:

  • (Fixnum)


1250
1251
1252
1253
1254
1255
# File 'ext/eio/eio_ext.c', line 1250

static VALUE
rb_eio_req_priority(VALUE obj)
{
    GetRequest(obj);
    return INT2NUM(req->pri);
}

#typeFixnum

Request type

Returns:

  • (Fixnum)


1236
1237
1238
1239
1240
1241
# File 'ext/eio/eio_ext.c', line 1236

static VALUE
rb_eio_req_type(VALUE obj)
{
    GetRequest(obj);
    return INT2NUM(req->type);
}