| 144 | } |
| 145 | template<class View> |
| 146 | forceinline ExecStatus |
| 147 | UnaryWait<View>::post(Home home, View x, |
| 148 | std::function<void(Space& home)> c) { |
| 149 | if (!c) |
| 150 | throw InvalidFunction("UnaryWait::post"); |
| 151 | if (x.assigned()) { |
| 152 | c(home); |
| 153 | return home.failed() ? ES_FAILED : ES_OK; |
| 154 | } else { |
| 155 | (void) new (home) UnaryWait<View>(home,x,c); |
| 156 | return ES_OK; |
| 157 | } |
| 158 | } |
| 159 | template<class View> |
| 160 | size_t |
| 161 | UnaryWait<View>::dispose(Space& home) { |