Lines Matching refs:a

12     internally, but invoke these functions in a `thread pool`_ and notify
21 callback is null. The return value of functions is a :ref:`libuv error code
23 The *asynchronous* form is called when a callback is passed and the return
52 Let's see a simple implementation of ``cat``. We start with registering
53 a callback for when the file is opened:
55 .. rubric:: uvcat/main.c - opening a file
62 The ``result`` field of a ``uv_fs_t`` is the file descriptor in case of the
72 In the case of a read call, you should pass an *initialized* buffer which will
76 ``UV_EOF`` constant would have been passed as a status instead.
78 Here you see a common pattern when writing asynchronous programs. The
100 a write that 'succeeds' may not be committed to disk yet.
185 libuv will automatically keep reading from a stream when ``uv_read_start()`` is
189 a collection of a pointer to bytes (``uv_buf_t.base``) and the length
199 local files [#]_. Here is a simple tee utility using libuv. Doing all operations
202 free a buffer until it has been written.
208 We start off opening pipes on the files we require. libuv pipes to a file are
240 Otherwise ``nread`` is a non-negative number and we can attempt to write that
244 The allocation callback may return a buffer with length zero if it fails to
258 ``write_data()`` makes a copy of the buffer obtained from read. This buffer
260 get around this we wrap a write request and a buffer in ``write_req_t`` and
261 unwrap it in the callbacks. We make a copy so we can free the two buffers from
263 for a demo program like this, you'll probably want smarter memory management,
264 like reference counted buffers or a pool of buffers in any major application.
269 unknowingly be writing to a pipe. This makes it susceptible to `aborting on
270 receiving a SIGPIPE`_. It is a good idea to insert::
276 .. _aborting on receiving a SIGPIPE: http://pod.tst.eu/http://cvs.schmorp.de/libev/ev.pod#The_speci…
286 difficult. To demonstrate, I'm going to build a simple utility which runs
287 a command whenever any of the watched files change::
329 #. ``const char *filename`` - If a directory is being monitored, this is the
332 #. ``int events`` - one of ``UV_RENAME`` or ``UV_CHANGE``, or a bitwise OR of