Skip to content

Implement an asynchronous dispatch to the plugin framework in pylightning #2167

@cdecker

Description

@cdecker

As pointed out by @ZmnSCPxj plugins currently only support a single JSON-RPC in flight at any point in time. This works fine for most interactions but long-polling cannot be done if other requests need to be served as well.

The idea is to introduce an additional keyword to the @plugin.method decorator called async. If this keyword is provided, the method must also have an argument called request which will be handed an instance of a new AsyncResult class that can be passed around and replied to eventually.

This does not introduce any multi-threaded or async primitives itself, leaving the choice to the users whether they want to use multi-threading, executors, greenlets, or whatever.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions