From 8d37c00c409e556301787d5270065c4dba2427ea Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Mon, 18 Jun 2012 19:14:08 -0500 Subject: [PATCH] Added note to README --- README.md | 11 ++++++++++- async.el | 13 +++++++++++-- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 45c4b46c4..ec7e83ac9 100644 --- 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) diff --git a/async.el b/async.el index 702899e15..48cb59cac 100644 --- 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 @@ -52,6 +52,15 @@ ;; ;; .... ;; (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) ;;; Code: -- 2.39.2