piker/piker
Tyler Goodlet 7396624be0 Rework history frame request concurrency
Manual tinker-testing demonstrated that triggering data resets
completely independent of the frame request gets more throughput and
further, that repeated requests (for the same frame after cancelling on
the `trio`-side) can yield duplicate frame responses. Re-work the
dual-task structure to instead have one task wait indefinitely on the
frame response (and thus not trigger duplicate frames) and the 2nd data
reset task poll for the first task to complete in a poll loop which
terminates when the frame arrives via an event.

Dirty deatz:
- make `get_bars()` take an optional timeout (which will eventually be
  dynamically passed from the history mgmt machinery) and move request
  logic inside a new `query()` closure meant to be spawned in a task
  which sets an event on frame arrival, add data reset poll loop in the
  main/parent task, deliver result on nursery completion.
- handle frame request cancelled event case without crash.
- on no-frame result (due to real history gap) hack in a 1 day decrement
  case which we need to eventually allow the caller to control likely
  based on measured frame rx latency.
- make `wait_on_data_reset()` a predicate without output indicating
  reset success as well as `trio.Nursery.start()` compat so that it can
  be started in a new task with the started values yielded being
  a cancel scope and completion event.
- drop the legacy `backfill_bars()`, not longer used.
2022-10-28 16:17:13 -04:00
..
brokers Rework history frame request concurrency 2022-10-28 16:17:13 -04:00
clearing Use new `Status.cancel_called` in EMS msg loops 2022-10-28 16:16:45 -04:00
cli Terser startup msg fields 2022-06-28 10:07:57 -04:00
data Pass in default history time of 1 min 2022-10-28 16:17:13 -04:00
fsp Always load FSPs with the default (fast) sampling period 2022-09-12 20:25:15 -04:00
testing Import client for now until we make a proper shim 2018-02-12 10:35:54 -05:00
ui Use new `Status.cancel_called` in EMS msg loops 2022-10-28 16:16:45 -04:00
watchlists Add license headers to pertinent files 2020-11-06 12:23:14 -05:00
__init__.py Drop dependence on `msgpack` and `msgpack_numpy` 2022-02-28 08:15:18 -05:00
_cacheables.py Port to new `tractor.trionics.maybe_open_context()` api 2022-01-23 21:01:38 -05:00
_daemon.py Oneliner enable rpc modules on runtime open 2022-08-25 11:47:40 -03:00
_profile.py Allow passing "ms slower then" value on cli to `--profile` 2022-04-30 11:36:23 -04:00
calc.py Lul, adhere to returning `str`s in `humanize()` 2022-01-25 07:57:01 -05:00
config.py Passthrough toml lib kwargs 2022-06-28 10:07:56 -04:00
log.py Type annot name in put to log routine 2022-06-05 22:13:36 -04:00
pp.py Handle `Position.split_ratio` in state audits 2022-08-17 10:06:58 -04:00
trionics.py Start trionics mod with an `async_enter_all` 2022-01-23 19:41:57 -05:00