mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-11 07:21:51 +00:00
Fiddle with the locking around channel disassociation
This still looks a bit sketchy to me (why isn't there locking in port::destroy?) but this manages to get rid of a problem with channels accessing their task after it's NULL.
This commit is contained in:
parent
b54eb0480d
commit
5c0fd045ce
@ -53,9 +53,8 @@ bool rust_chan::is_associated() {
|
||||
void rust_chan::disassociate() {
|
||||
A(kernel, is_associated(),
|
||||
"Channel must be associated with a port.");
|
||||
|
||||
if (port->is_proxy() == false) {
|
||||
scoped_lock with(port->referent()->lock);
|
||||
if (port->is_proxy() == false) {
|
||||
KLOG(kernel, task,
|
||||
"disassociating chan: 0x%" PRIxPTR " from port: 0x%" PRIxPTR,
|
||||
this, port->referent());
|
||||
|
Loading…
Reference in New Issue
Block a user