Skip to content
This repository has been archived by the owner on Oct 25, 2023. It is now read-only.

stream shall be created only once during prepare #22

Closed
MatiasVara opened this issue Aug 2, 2023 · 3 comments
Closed

stream shall be created only once during prepare #22

MatiasVara opened this issue Aug 2, 2023 · 3 comments
Assignees

Comments

@MatiasVara
Copy link

Stream shall be created only during transiting from SET_PARAM to PREPARE in the prepare() cmd. Otherwise, we are creating several streams, each time guest triggers the prepare() cmd. See

let mut stream = pw::stream::Stream::<i32>::new(

@dorindabassey
Copy link

I thought that the best approach was to add a pw_stream_destroy bindings, because using a Drop impl makes the stream destroy itself automatically as soon as the first one is dropped, even though the "real" Stream wrapper is still being used, but that's apparently not the best approach aswell, Since adding the pw_stream_destroy bindings results in some segfault. The other workaround would have been to create the stream on the condition that the stream has not been created yet, But the condition blocks the usage of stream in the stream_listener.

@MatiasVara
Copy link
Author

The other workaround would have been to create the stream on the condition that the stream has not been created yet, But the condition blocks the usage of stream in the stream_listener.

Could you elaborate on this?

@MatiasVara
Copy link
Author

I close this issue since this is tracked at #43.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants