1. 19 Jun, 2018 1 commit
  2. 31 May, 2018 2 commits
  3. 08 Jan, 2018 1 commit
    • Marek Vavruša's avatar
      Implement worker coroutines for asynchronous background processing · 8fa95978
      Marek Vavruša authored
      This implements worker coroutines in Lua to perform non-blocking I/O and do many things concurrently.
      For example a file watcher can be now implemented as:
      
      ```
        local watcher = notify.opendir('/etc')
        watcher:add('hosts')
      
        -- Watch changes to /etc/hosts
        worker.coroutine(function ()
          for flags, name in watcher:changes() do
            for flag in notify.flags(flags) do
              print(name, notify[flag])
            end
          end
        end)
      ```
      
      In order to make this work, the runtime uses the cqueues library which
      can run coroutines concurrently, and return a file descriptor to poll on
      if it's blocked. The worker takes that file descriptor and calls
      `event.socket(pollfd, resume_callback)` so that libuv can wake up
      the worker when its ready again.
      
      The cqueues library is still optional, but if it's not present following stuff
      won't work:
      
      * worker.coroutine()
      * worker.sleep()
      8fa95978
  4. 21 Dec, 2017 1 commit
    • Marek Vavruša's avatar
      modules/http: added /trace endpoint for request log tracing, added tests · 5e7e4c1e
      Marek Vavruša authored
      This leverages the HTTP interface to trace execution of individual
      requests. This is helpful for troubleshooting problems with a specific instance,
      or to generate test files (as it writes out answers received).
      
      Ideally it would also print a timeline of request processing broken down by
      function (or layer) and the amount of time spent, but there's no
      tracepoint for that yet.
      5e7e4c1e
  5. 12 Dec, 2017 1 commit
  6. 24 Nov, 2017 1 commit
  7. 16 Jun, 2017 1 commit
  8. 17 May, 2017 1 commit
  9. 21 Dec, 2016 1 commit
  10. 19 Dec, 2016 5 commits
  11. 25 Aug, 2016 1 commit
  12. 06 Jul, 2016 13 commits