PipetoRouter Future Cannot Be Sent Across Threads - Mediasoup Rust

Hi, I Am New To Rust And To Mediasoup Rust. I Keep Getting Future Cannot Be Sent Across Threads Error When I Use PipetoRouter. Here Is The Code I Have Written:

                        let routers_clone = Arc::clone(&consumer_routers);
                        let prod_routers_clone = Arc::clone(&producer_routers);
                        tokio::spawn ( async move {
                        let router = routers_clone.read().await;
                        let prod_router = prod_routers_clone.read().await;
                        let opts = PipeToRouterOptions::new(prod_router[0].clone());
                        let pipe_producer = router[0].pipe_producer_to_router(data, opts).await;

Any Help Would Be Gladly Appreciated!

I was having the same issue. Should be fixed once this commit gets released.

Until then you can specify mediasoup as a dependency using

mediasoup = { git = "https://github.com/versatica/mediasoup", rev = "bf7a397" }

to get the latest changes