How to schedule observable timer on LOWER priority thread #2210
Unanswered
mwpowellhtx
asked this question in
Q&A
Replies: 1 comment
-
Looking at the available schedulers, perhaps it is |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, not sure I asked along these lines, did not find it otherwise in the discussions...
I need to be able to watch a timer on a thread priority LOWER than that of the UI. I have some timer events pinging upstream API for data sources, and those are working as they should. At their critical junctures with the UI, we rejoin the UI thread in order to sync up, with WPF EH, view models, view bindings, etc. It's "working" ... to a point.
We've got code along these lines. Do not mind
NodaObservable
, I have someNodaTime
constructs making the appropriate conversions fromNodaTime.Duration
and so forth to theObservable.Timer
time units (seconds, I think). The important part isNewThreadScheduler.Default
, which we do want, should perpetually run as long as the application wants the service.However, the thread seems to be normal priority, and is interfering with normal, casual UI engagement. So we REALLY REALLY REALLY need to schedule that thread at a lower priority than that of the UI thread.
We broached the topic somewhat tangentially over virtual timer base class constructs, but I am still not clear how may we configure the default
IScheduler
in such a way. Or it is something that could be promoted to proper issue and addressed.Or perhaps there is a different scheduler we may use that would mesh better with WPF (or any) UI threads.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions