From aee56569d114b962d3c875c6ff62d33a3033bd4e Mon Sep 17 00:00:00 2001 From: John Colvin Date: Sun, 15 Sep 2024 23:36:08 -0400 Subject: [PATCH] Replace trivial refs to ThreadedBlackboard w/ IBus --- .../spark/AW2/Bus/SingleOptionDriverPricePublisher.cs | 8 ++++---- src/client/spark/AW2/Bus/VolSurfaceBlackboardManager.cs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/client/spark/AW2/Bus/SingleOptionDriverPricePublisher.cs b/src/client/spark/AW2/Bus/SingleOptionDriverPricePublisher.cs index 442ba61df..fc4319cf0 100644 --- a/src/client/spark/AW2/Bus/SingleOptionDriverPricePublisher.cs +++ b/src/client/spark/AW2/Bus/SingleOptionDriverPricePublisher.cs @@ -51,7 +51,7 @@ namespace mbts.spark { public sealed class SingleOptionDriverPricePublisher : IDisposable { readonly object syncRoot = new(); private readonly SecurityTuple _sec_tup; - private ThreadedBlackboard _bb; + readonly IBus _bus; // tags private OptionDriverPriceMap _last_published; private readonly PerfStatsLogger _logger; @@ -61,10 +61,10 @@ namespace mbts.spark { AnalyticsExpirationParametersMap param_map; IDisposable dispose; - public SingleOptionDriverPricePublisher(SecurityTuple sec_tup, ThreadedBlackboard bb, IBus bus) { + public SingleOptionDriverPricePublisher(SecurityTuple sec_tup, IBus bus) { bts.Log.Gen.info($"SingleOptionDriverPricePublisher initialized st:{sec_tup}"); _sec_tup = sec_tup; - _bb = bb; + _bus = bus; _logger = new PerfStatsLogger(50, 50, $"SingleOptionDriverPricePublisher_{sec_tup.security_name}_{GetHashCode()}"); _last_published = new OptionDriverPriceMap(sec_tup.security_name, @@ -136,7 +136,7 @@ namespace mbts.spark { // bts.Log.Gen.info("SingleOptionDriverPricePublisher._compute_and_fire \n" + // $"map:{to_fire.log_string()}"); _logger.stop_default_timer(); - _bb.post(SparkTags.OptionDriverBBOTag((_sec_tup.security_name, _sec_tup.security_exchange)), + _bus.post(SparkTags.OptionDriverBBOTag((_sec_tup.security_name, _sec_tup.security_exchange)), new OptionDriverPriceMap(_sec_tup.security_name, res)); } } diff --git a/src/client/spark/AW2/Bus/VolSurfaceBlackboardManager.cs b/src/client/spark/AW2/Bus/VolSurfaceBlackboardManager.cs index 53fc7b5fe..bfdb61fba 100644 --- a/src/client/spark/AW2/Bus/VolSurfaceBlackboardManager.cs +++ b/src/client/spark/AW2/Bus/VolSurfaceBlackboardManager.cs @@ -57,7 +57,7 @@ namespace mbts.spark if (!_option_driver_map.ContainsKey(sec_tup)) { bts.Log.Gen.info($"ResourceAllocator._on_data allocating SingleOptionDriverPricePublisher for '{sec_tup}'"); - _option_driver_map.Add(sec_tup, new SingleOptionDriverPricePublisher(sec_tup, _bb, bus)); + _option_driver_map.Add(sec_tup, new(sec_tup, bus)); } } }