Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Remove 'static constraint on callbacks #59

Closed
wants to merge 5 commits into from

Conversation

kangalio
Copy link

@kangalio kangalio commented Jun 17, 2020

As discussed in #44, this removes the 'static constraint on message callbacks by leveraging the thread-scoped crate.

So far I made the ALSA, JACK and WinMM backend work.

src/common.rs Outdated
@@ -53,7 +53,7 @@ pub struct MidiInput {
imp: MidiInputImpl
}

impl MidiInput {
impl<'a> MidiInput {
Copy link
Owner

Choose a reason for hiding this comment

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

Why is the lifetime added to the impl instead of the function connect where it's needed?

Copy link
Author

Choose a reason for hiding this comment

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

That was the first thing that came to my mind in order to fix the lifetime compile errors. For some reason I didn't think of making the lifetime connect-specific. Fixed in 8727d91

@kangalio kangalio changed the title WIP (only ALSA): Remove 'static constraint on callbacks WIP: Remove 'static constraint on callbacks Jun 20, 2020
@Boddlnagg
Copy link
Owner

Closing because this unfortunately cannot work (as explained in #44 (comment))

@Boddlnagg Boddlnagg closed this Apr 11, 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