Add TestCase.async_complete_full method to avoid requiring a lambda

This commit is contained in:
Michael Gratton 2019-03-31 01:29:52 +11:00
parent 4be138f810
commit 60a3f9346d

View file

@ -256,6 +256,14 @@ public abstract class TestCase : Object {
this.main_loop.wakeup();
}
protected void async_complete_full(GLib.Object? object,
AsyncResult result) {
this.async_results.push(result);
// notify the loop so that if async_result() has already been
// called, that method won't block
this.main_loop.wakeup();
}
protected AsyncResult async_result() {
AsyncResult? result = null;
while (result == null) {