rs: Run hooks, methods and notification handlers in tokio tasks

Changelog-Changed: cln-plugin: Hooks, notifications and RPC methods now run asynchronously allowing for re-entrant handlers
This commit is contained in:
Christian Decker
2023-04-11 06:57:45 +09:30
committed by ShahanaFarooqui
parent db3707f957
commit f69da84256
5 changed files with 97 additions and 144 deletions

View File

@@ -11,8 +11,8 @@ use std::str::FromStr;
use std::{io, str};
use tokio_util::codec::{Decoder, Encoder};
use crate::messages::{Notification, Request};
use crate::messages::JsonRpc;
use crate::messages::{Notification, Request};
/// A simple codec that parses messages separated by two successive
/// `\n` newlines.