-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Conversation
plugins/net_plugin/net_plugin.cpp
Outdated
} | ||
|
||
void net_plugin_impl::start_txn_timer() { | ||
transaction_check->expires_from_now( txn_exp_period); | ||
transaction_check->async_wait( [this](boost::system::error_code ec) { | ||
transaction_check->async_wait(app().get_priority_queue().wrap(priority::low-1, [this](boost::system::error_code ec) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really like the mixed metaphor of priority is a category and priority is a number. I'm fine with having named points on the range, but then perhaps we can name this one as well (even if only locally).
I guess, in a single logical bit of code it should consistently treat priority as a category or a number but not both?
I have some comments on the appbase changes too that regard this duality
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Used a variable to name it locally. appbase was updated to just always execute the highest so there are no more ranges only named points on the range.
Change Description
application
threadAll posted jobs now require a priority that determines the order of execution. If any jobs are posted to the main application thread without using the provided priority wrapper they are executed as if they have the highest priority. Therefore, the priority wrapper should be used for all jobs posted either via
post
,async_read
,async_write
,async_wait
, etc.Consensus Changes
None
API Changes
Any plugins posting to the main
application
thread should consider using the new priority wrapper.Documentation Additions
See API changes.