Rust-GPU / Rust-CUDA

Ecosystem of libraries and tools for writing and executing fast GPU code fully in Rust.
Apache License 2.0
3.16k stars 120 forks source link

wait_event method in Stream #110

Open gaxler opened 1 year ago

gaxler commented 1 year ago

I have encountered an issue related to the wait_event method in the Stream struct. It appears that when the method is called, it consumes the Event object, resulting in the event being dropped each time.

Considering that generating events is not cheap, I would like to understand the rationale behind passing ownership of the event and dropping it on each wait. Is there a specific reason for not passing an event reference instead, allowing the event to be reused?

Thanks!

juntyr commented 2 months ago

+1