]> code.delx.au - gnu-emacs-elpa/commitdiff
Added note to README
authorJohn Wiegley <johnw@newartisans.com>
Tue, 19 Jun 2012 00:14:08 +0000 (19:14 -0500)
committerJohn Wiegley <johnw@newartisans.com>
Tue, 19 Jun 2012 00:14:08 +0000 (19:14 -0500)
README.md
async.el

index 45c4b46c403d217b5c266e97a38fd7331da48560..ec7e83ac908dc431b7577a9028170cdbcaec84ce 100644 (file)
--- a/README.md
+++ b/README.md
@@ -14,7 +14,8 @@ Adds the ability to process Lisp concurrently, with a very simple syntax:
          (message "Async process done, result should be 222: %s" result)))
 
 If you omit the callback function, `async-start` will return a process object
-that you can `async-get` on when you're ready to wait for the result value:
+that you can call `async-get` on when you're ready to wait for the result
+value:
 
     (let ((proc (async-start
                    ;; What to do in the child process
@@ -26,3 +27,11 @@ that you can `async-get` on when you're ready to wait for the result value:
         ;; ....
         (message "Async process done, result should be 222: %s"
                  (async-get proc)))
+
+If you don't want to use a callback, and you don't care about any return value
+form the child proces, pass the `ignore` symbol as the second argument:
+
+    (async-start
+     (lambda ()
+       (delete-file "a remote file on a slow link" nil))
+     'ignore)
index 702899e1538a8b1f1f4daa52de0a884fff5abb32..48cb59cac13971f71582587f459dc6d254b56807 100644 (file)
--- a/async.el
+++ b/async.el
@@ -39,8 +39,8 @@
 ;;        (message "Async process done, result should be 222: %s" result)))
 ;;
 ;; If you omit the callback function, `async-start' will return a process
-;; object that you can `async-get' on when you're ready to wait for the result
-;; value:
+;; object that you can call `async-get' on when you're ready to wait for the
+;; result value:
 ;;
 ;;   (let ((proc (async-start
 ;;                  ;; What to do in the child process
 ;;       ;; ....
 ;;       (message "Async process done, result should be 222: %s"
 ;;                (async-get proc)))
+;;
+;; If you don't want to use a callback, and you don't care about any return
+;; value form the child proces, pass the `ignore' symbol as the second
+;; argument:
+;;
+;;   (async-start
+;;    (lambda ()
+;;      (delete-file "a remote file on a slow link" nil))
+;;      'ignore)
 \f
 ;;; Code: