blaze-rs 1.0.3

A Rustified OpenCL Experience
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Events

Blaze events are considered a mixture of a Rust [`Future`](https://doc.rust-lang.org/stable/std/future/trait.Future.html) and [`JoinHandle`](https://doc.rust-lang.org/stable/std/thread/struct.JoinHandle.html). Their signature is the following:

```rust,ignore
use std::sync::mpsc::Sender;

pub struct Event<C> {
    inner: RawEvent,
    consumer: C,
    #[cfg(not(feature = "cl1_1"))]
    send: Sender<EventCallback>,
    #[cfg(feature = "cl1_1")]
    send: PhantomData<Sender<()>>,
}
```

Blaze events contain their underlying `RawEvent` alongside a `Consumer`.