glenda.party
term% ls -F
term% cat index.txt
9PQUEUE(2)                    System Calls Manual                   9PQUEUE(2)



NAME
       Reqqueue,  reqqueuecreate,  reqqueuepush, reqqueueflush - deferred pro‐
       cessing of 9P requests

SYNOPSIS
       #include <u.h>
       #include <libc.h>
       #include <fcall.h>
       #include <thread.h>
       #include <9p.h>

       struct Reqqueue
       {
            ...
       };

       Reqqueue*    reqqueuecreate(void);
       void         reqqueuepush(Reqqueue *q, Req *r, void (*f)(Req *));
       void         reqqueueflush(Reqqueue *q, Req *r);

DESCRIPTION
       Reqqueue provides routines for deferred processing  of  9p  request  in
       multithreaded 9p servers.

       The  reqqueuecreate function spawns a process for handling requests re‐
       turning a pointer to the Reqqueue structure allocated.

       To schedule a request to be  processed  on  a  queue,  reqqueuepush  is
       called with request r and its handler function f.

       A previously submitted request can be flushed from a queue by reqqueue‐
       flush which will remove the request immediately if processing  has  not
       started.  If  processing  has  been started, the process will be inter‐
       rupted.

SOURCE
       /sys/src/lib9p/queue.c

SEE ALSO
       9p(2)



                                                                    9PQUEUE(2)