/// Instantiate a new Iocontext. `maxops` is the maximum number of
/// outstanding operations, which sets the upper limit on memory
/// allocated.
Instantiate a new Iocontext. `maxops` is the maximum number of
outstanding operations, which sets the upper limit on memory
allocated.
Instantiate a new Iocontext . ` maxops ` is the maximum number of outstanding operations which sets the upper limit on memory allocated .
pub fn new(maxops: usize) -> io::Result<Iocontext<T, Wb, Rb>> {
        let mut r = Iocontext {
            ctx: Iocontextwrap { ctx: ptr::null_mut() },
            maxops: maxops,
            batch: Iobatch::new(maxops),
            evfd: None,
            submitted: 0,
        };
        let e = unsafe { aio::io_queue_init(maxops as i32, &mut r.ctx.ctx) };
        if e < 0 {
            Err(io::Error::from_raw_os_error(e))
        } else {
            Ok(r)
        }
    }
pub fn new ( maxops : usize ) -> io :: Result < Iocontext < T , Wb , Rb > > { let mut r = Iocontext { ctx : Iocontextwrap { ctx : ptr :: null_mut ( ) } , maxops : maxops , batch : Iobatch :: new ( maxops ) , evfd : None , submitted : 0 , } ; let e = unsafe { aio :: io_queue_init ( maxops as i32 , & mut r . ctx . ctx ) } ; if e < 0 { Err ( io :: Error :: from_raw_os_error ( e ) ) } else { Ok ( r ) } }
Instantiate a new Iocontext.
Instantiate a new Iocontext .
maxops
usize