Version 1.3 of package Futur has just been released in GNU ELPA.
You can now find it in M-x list-packages RET.

Futur describes itself as:

  ==================================
  Future/promise-based async library
  ==================================

More at https://elpa.gnu.org/packages/futur.html

## Summary:

  A library to try and make async programming a bit easier.
  This is inspired from Javscript's async/await, Haskell's monads,
  and ConcurrentML's events.

  You can create trivial futures with `futur-done'.
  You can create a "process future" with `futur-process-call'.
  And the main way to use futures is to compose them with `futur-let*',
  which can be used as follows:

      (futur-let*
          ((buf (current-buffer))
           (exitcode1 <- (futur-process-call CMD1 nil buf nil ARG1 ARG2))
           (out (with-current-buffer buf
                  (buffer-string)))  ;; Get the process's output.
           (exitcode2 <- (futur-process-call CMD2 nil buf nil ARG3 ARG4)))
        (with-current-buffer buf
          (concat out (buffer-string))))

## Recent NEWS:

Version 1.3:

- Syntax of `:error-fun' changed in `futur-let*'.
- Remove `idle' argument from `futur-timeout'.
- Adjusted `futur-hacks-mode' to changes in Emacs `master'.

Version 1.2:

- `futur-abort' takes a second argument (the reason for the abortion).
- New function `futur-funcall'.
- `futur-bind' and `futur-blocking-wait-to-get-result' can now select
  which errors they catch.
- New function `futur-p'.
- Preliminary support to run ELisp code in subproceses&sandboxes.
- Experimental `futur-hacks-mode' using the preliminary sandbox code.
- New var `futur-use-threads' to be able to force the use of timers.

Version 1.1:

- New functions: `futur-race', `futur-sit-for', `futur-url-retrieve'.
- New function `futur-concurrency-bound' when you need to limit concurrency.
- Rename `futur-error' to `futur-failed'.
- Rename `futur-register-callback' to `futur--register-callback'.
- Rename `futur-ize' to `futur--ize'.
- Fix compatibility with Emacs<31.
- Minor bug fixes.

Version 1.0:

- After years of sitting in the dark, it's finally getting dusted up for
  a release.

Reply via email to