| 929 | |
| 930 | |
| 931 | Status MesosExecutorDriver::join() |
| 932 | { |
| 933 | // Exit early if the driver is not running. |
| 934 | synchronized (mutex) { |
| 935 | if (status != DRIVER_RUNNING) { |
| 936 | return status; |
| 937 | } |
| 938 | } |
| 939 | |
| 940 | // If the driver was running, the latch will be triggered regardless |
| 941 | // of the current `status`. Wait for this to happen to signify |
| 942 | // termination. |
| 943 | CHECK_NOTNULL(latch)->await(); |
| 944 | |
| 945 | // Now return the current `status` of the driver. |
| 946 | synchronized (mutex) { |
| 947 | CHECK(status == DRIVER_ABORTED || status == DRIVER_STOPPED); |
| 948 | |
| 949 | return status; |
| 950 | } |
| 951 | } |
| 952 | |
| 953 | |
| 954 | Status MesosExecutorDriver::run() |