| 2867 | } |
| 2868 | |
| 2869 | int64_t CConnman::PoissonNextSendInbound(int64_t now, int average_interval_seconds) |
| 2870 | { |
| 2871 | if (m_next_send_inv_to_incoming < now) { |
| 2872 | // If this function were called from multiple threads simultaneously |
| 2873 | // it would possible that both update the next send variable, and return a different result to their caller. |
| 2874 | // This is not possible in practice as only the net processing thread invokes this function. |
| 2875 | m_next_send_inv_to_incoming = PoissonNextSend(now, average_interval_seconds); |
| 2876 | } |
| 2877 | return m_next_send_inv_to_incoming; |
| 2878 | } |
| 2879 | |
| 2880 | int64_t PoissonNextSend(int64_t now, int average_interval_seconds) |
| 2881 | { |
no test coverage detected