Skip to content

Conversation

@TheBlueMatt
Copy link
Collaborator

Based on #24.

Because Send+Sync are generated by the compiler for us, we don't
really know when we should or should not generate it. That said,
Send+Sync aren't exposed outside of Rust, so it only impacts
whether we can use a type when passed to Rust, not how users will
ultimately interact with types.
@TheBlueMatt TheBlueMatt force-pushed the 2021-04-bp-inclusion branch from b549a27 to 3edf2d5 Compare June 2, 2021 16:29
@TheBlueMatt
Copy link
Collaborator Author

Rebased and added a few commits to improve clone-ability.

@valentinewallace valentinewallace self-requested a review June 2, 2021 16:29
/// [`FilesystemPersister::persist_manager`]: lightning_persister::FilesystemPersister::persist_manager
#[must_use]
#[no_mangle]
pub extern "C" fn BackgroundProcessor_start(mut persister: crate::lightning_background_processor::ChannelManagerPersister, mut event_handler: crate::lightning::util::events::EventHandler, chain_monitor: &crate::lightning::chain::chainmonitor::ChainMonitor, channel_manager: &crate::lightning::ln::channelmanager::ChannelManager, peer_manager: &crate::lightning::ln::peer_handler::PeerManager, mut logger: crate::lightning::util::logger::Logger) -> BackgroundProcessor {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yay super excited for this to be exposed! I wonder how this is gonna reconcile with e.g. ChannelManagerPersister and other Java sample modules that currently are redundant to some of BackgroundProcessor's job?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My plan was to drop the similar Java wrappers entirely and move towards common wrappers, but still working on making it work sensibly with stop taking self ownership.

@TheBlueMatt TheBlueMatt force-pushed the 2021-04-bp-inclusion branch from 3edf2d5 to f0a481f Compare June 2, 2021 19:19
@TheBlueMatt TheBlueMatt merged commit 4e514de into lightningdevkit:main Jun 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants