]> git.lizzy.rs Git - rust.git/blob - src/rt/rust_chan.h
Populate tree.
[rust.git] / src / rt / rust_chan.h
1
2 #ifndef RUST_CHAN_H
3 #define RUST_CHAN_H
4
5 class rust_chan : public rc_base<rust_chan>, public task_owned<rust_chan> {
6 public:
7     rust_chan(rust_task *task, rust_port *port);
8     ~rust_chan();
9
10     rust_task *task;
11     rust_port *port;
12     circ_buf buffer;
13     size_t idx;           // Index into port->chans.
14
15     // Token belonging to this chan, it will be placed into a port's
16     // writers vector if we have something to send to the port.
17     rust_token token;
18
19     void disassociate();
20 };
21
22 #endif /* RUST_CHAN_H */