use a TaskGroup for mempool notification tasks #94
No reviewers
Labels
No labels
area: database
area: documentation
area: elasticsearch
area: herald
area: packaging
area: scribe
consider soon
critical
dependencies
good first issue
hacktoberfest
help wanted
improvement
needs: repro
new feature
priority: blocker
priority: high
priority: low
priority: medium
type: bug
type: bug-fix
type: discussion
type: feature request
type: improvement
type: new feature
type: refactor
type: task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: LBRYCommunity/hub#94
Loading…
Reference in a new issue
No description provided.
Delete branch "mempool-task-group"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
As you noted in coversation,
SessionManager._notify_peers()
has the same problem. (I see it's dead code at the moment.)LBRYElectrumX has a
_task_group
member. Have you considered using that?It requires rework inside
session.send_notification()
andsession.send_history_notifications()
, but storing the task in the session would allow cancellation onconnection_lost()
or other scenarios.For example:
send_notification()
creates and stores a task. The task logic is put in_send_notification()
.Just for consistency with
_send_notification/send_notification
, this should be named_send_notifications
as it's the non-task-creating version.