Atomic ref counting for chans.
This commit is contained in:
parent
200bbcf91b
commit
b62e80c1f0
12 changed files with 61 additions and 38 deletions
|
@ -904,9 +904,14 @@ void del_chan(rust_task *task, rust_chan *chan) {
|
|||
chan->destroy();
|
||||
}
|
||||
|
||||
extern "C" CDECL
|
||||
void take_chan(rust_task *task, rust_chan *chan) {
|
||||
chan->ref();
|
||||
}
|
||||
|
||||
extern "C" CDECL
|
||||
void drop_chan(rust_task *task, rust_chan *chan) {
|
||||
chan->ref_count--;
|
||||
chan->deref();
|
||||
}
|
||||
|
||||
extern "C" CDECL
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue