Add TestCase.async_complete_full method to avoid requiring a lambda
This commit is contained in:
parent
4be138f810
commit
60a3f9346d
1 changed files with 8 additions and 0 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue