all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Nikolay Kudryavtsev <nikolay.kudryavtsev@gmail.com>
To: "help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
Subject: Wait for function to execute?
Date: Fri, 9 Jun 2017 00:34:40 +0300	[thread overview]
Message-ID: <a4aac7df-74f1-c962-a925-7254e83940f2@gmail.com> (raw)

Hello.

I have a case where I'm writing a unit test(A) that needs to wait for a 
function(B) that's called by a process sentinel for a process started by 
this unit test. So, when A runs, B runs too, eventually... Since it's a 
unit test, changing B is off limits.

So far I'm thinking of advising B using advice-once described by Drew 
here <https://emacs.stackexchange.com/a/26260/9143>. As my advice 
function I would use a closure that wraps over some condition. Then I 
would have a while loop that sleeps until that condition is fulfilled. 
All this wrapped into one beautiful(ha!) macro. Are there any more, ugh, 
reasonable options?

-- 
Best Regards,
Nikolay Kudryavtsev



             reply	other threads:[~2017-06-08 21:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-08 21:34 Nikolay Kudryavtsev [this message]
2017-06-09  1:40 ` Wait for function to execute? Emanuel Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a4aac7df-74f1-c962-a925-7254e83940f2@gmail.com \
    --to=nikolay.kudryavtsev@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.