File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,9 @@ use crate::{AtomicF64, MAX_CHANNELS};
20
20
21
21
use crossbeam_channel:: Receiver ;
22
22
23
+ // I doubt this construct is entirely safe. Stream is not Send/Sync (probably for a good reason) so
24
+ // it should be managed from a single thread instead.
25
+ // <https://github.com/orottier/web-audio-api-rs/issues/357>
23
26
mod private {
24
27
use super :: * ;
25
28
@@ -28,6 +31,7 @@ mod private {
28
31
29
32
impl ThreadSafeClosableStream {
30
33
pub fn new ( stream : Stream ) -> Self {
34
+ #[ allow( clippy:: arc_with_non_send_sync) ]
31
35
Self ( Arc :: new ( Mutex :: new ( Some ( stream) ) ) )
32
36
}
33
37
Original file line number Diff line number Diff line change @@ -34,6 +34,9 @@ impl<F> CubebStream for Stream<F> {
34
34
}
35
35
}
36
36
37
+ // I doubt this construct is entirely safe. Stream is not Send/Sync (probably for a good reason) so
38
+ // it should be managed from a single thread instead.
39
+ // <https://github.com/orottier/web-audio-api-rs/issues/357>
37
40
mod private {
38
41
use super :: * ;
39
42
use std:: sync:: Mutex ;
@@ -44,6 +47,7 @@ mod private {
44
47
impl ThreadSafeClosableStream {
45
48
pub fn new < F : ' static > ( stream : Stream < F > ) -> Self {
46
49
let boxed_stream = BoxedStream ( Box :: new ( stream) ) ;
50
+ #[ allow( clippy:: arc_with_non_send_sync) ]
47
51
Self ( Arc :: new ( Mutex :: new ( Some ( boxed_stream) ) ) )
48
52
}
49
53
You can’t perform that action at this time.
0 commit comments