| 2834 | |
| 2835 | |
| 2836 | bool ProcessManager::_deliver( |
| 2837 | ProcessBase* destination, |
| 2838 | Event* event, |
| 2839 | ProcessBase* sender) |
| 2840 | { |
| 2841 | CHECK(event != nullptr); |
| 2842 | |
| 2843 | // If we are using a manual clock then update the current time of |
| 2844 | // the receiver using the sender if necessary to preserve the |
| 2845 | // happens-before relationship between the sender and receiver. Note |
| 2846 | // that the assumption is that the sender remains valid for at least |
| 2847 | // the duration of this routine (so that we can look up its current |
| 2848 | // time). |
| 2849 | if (Clock::paused()) { |
| 2850 | Clock::update( |
| 2851 | destination, Clock::now(sender != nullptr ? sender : __process__)); |
| 2852 | } |
| 2853 | |
| 2854 | return destination->enqueue(event); |
| 2855 | } |
| 2856 | |
| 2857 | |
| 2858 | UPID ProcessManager::spawn(ProcessBase* process, bool manage) |