help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Wait for function to execute?


From: Nikolay Kudryavtsev
Subject: Wait for function to execute?
Date: Fri, 9 Jun 2017 00:34:40 +0300
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1

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 via email to

[Prev in Thread] Current Thread [Next in Thread]