| 2227 | |
| 2228 | |
| 2229 | Status MesosSchedulerDriver::join() |
| 2230 | { |
| 2231 | // We can use the process pointer to detect if the driver was ever |
| 2232 | // started properly. If it wasn't, we return the current status |
| 2233 | // (which should either be DRIVER_NOT_STARTED or DRIVER_ABORTED). |
| 2234 | synchronized (mutex) { |
| 2235 | if (process == nullptr) { |
| 2236 | CHECK(status == DRIVER_NOT_STARTED || status == DRIVER_ABORTED); |
| 2237 | |
| 2238 | return status; |
| 2239 | } |
| 2240 | } |
| 2241 | |
| 2242 | // Otherwise, wait for stop() or abort() to trigger the latch. |
| 2243 | CHECK_NOTNULL(latch)->await(); |
| 2244 | |
| 2245 | synchronized (mutex) { |
| 2246 | CHECK(status == DRIVER_ABORTED || status == DRIVER_STOPPED); |
| 2247 | |
| 2248 | return status; |
| 2249 | } |
| 2250 | } |
| 2251 | |
| 2252 | |
| 2253 | Status MesosSchedulerDriver::run() |