| 183 | |
| 184 | |
| 185 | inline Sequence::~Sequence() |
| 186 | { |
| 187 | // We set `inject` to false so that the terminate message is added to the |
| 188 | // end of the sequence actor message queue. This guarantees that all `add()` |
| 189 | // calls which happened before the sequence destruction are processed. |
| 190 | // See MESOS-8741. |
| 191 | process::terminate(process, false); |
| 192 | process::wait(process); |
| 193 | delete process; |
| 194 | } |
| 195 | |
| 196 | |
| 197 | template <typename T> |