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

servo/media/webrtc uses stdlib channels. #16

Open
gatoWololo opened this issue Jul 2, 2019 · 0 comments
Open

servo/media/webrtc uses stdlib channels. #16

gatoWololo opened this issue Jul 2, 2019 · 0 comments

Comments

@gatoWololo
Copy link
Owner

It seems the webrtc controller uses regular std::sync::mpsc channels:

impl WebRtcController {
    pub fn new<T: WebRtcBackend>(signaller: Box<WebRtcSignaller>) -> Self {
        let (sender, receiver) = channel();

        let t = WebRtcController { sender };

        let mut controller = T::construct_webrtc_controller(signaller, t.clone());

        thread::spawn(move || {
            while let Ok(event) = receiver.recv() {
                if !handle_rtc_event(&mut controller, event) {
                    // shut down event loop
                    break;
                }
            }
        });

        t
    }

We should check for other uses of these channels.

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

No branches or pull requests

1 participant