From c6048e2bab4f8fa5f4cda6a9cd2f3961f2371f3c Mon Sep 17 00:00:00 2001 From: Greg Fitzgerald Date: Thu, 19 Apr 2018 10:02:46 -0700 Subject: [PATCH] Workaround linux hang Without this patch, Linux systems would hang when running the demo. The root cause (why Linux is acting differently than macOS) was not determined, but we know the problem is caused by a known issue in the transaction pipeline - that entries are not pulled off the historian channel until after the full transaction batch is processed. This patch makes the sync_channel large enough that it should never block on a gigabit network. --- src/historian.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/historian.rs b/src/historian.rs index 93c49f733f..412027846f 100644 --- a/src/historian.rs +++ b/src/historian.rs @@ -16,8 +16,8 @@ pub struct Historian { impl Historian { pub fn new(start_hash: &Hash, ms_per_tick: Option) -> Self { - let (sender, event_receiver) = sync_channel(1000); - let (entry_sender, receiver) = sync_channel(1000); + let (sender, event_receiver) = sync_channel(10_000); + let (entry_sender, receiver) = sync_channel(10_000); let thread_hdl = Historian::create_recorder(*start_hash, ms_per_tick, event_receiver, entry_sender); Historian {