public void QueueWork(Action callback, Action after) { var pr = new PermaRequest(UV.Sizeof(UvRequestType.UV_WORK)); var before = new CAction <IntPtr>((ptr) => callback()); var cafter = new CAction <IntPtr>((ptr) => { pr.Dispose(); if (after != null) { after(); } }); int r = uv_queue_work(Handle, pr.Handle, before.Callback, cafter.Callback); Ensure.Success(r, this); }
internal UVStream(Loop loop, UvHandleType type) : this(loop, UV.Sizeof(type)) { }
public FileSystemRequest() : base(Size) { fsrequest = (uv_fs_t *)(Handle + UV.Sizeof(RequestType.UV_REQ)); }
internal Handle(Loop loop, UvHandleType type) : this(loop, UV.Sizeof(type)) { }
public CallbackPermaRequest(RequestType type) : this(UV.Sizeof(type)) { }
public CallbackPermaRequest(UvRequestType type, bool allocate) : this(UV.Sizeof(type), allocate) { }