()
| 82 | } |
| 83 | |
| 84 | function vote() { |
| 85 | if (canceled) { return; } |
| 86 | when(task(), |
| 87 | function (result) { |
| 88 | when(verifier(result), |
| 89 | function (verification) { |
| 90 | return verification ? certify(result) : schedule(result); |
| 91 | }, |
| 92 | function () { schedule(result); } |
| 93 | ); |
| 94 | }, |
| 95 | reject |
| 96 | ); |
| 97 | } |
| 98 | |
| 99 | if (delayInitialTask) { |
| 100 | schedule(); |