diff options
| author | Eric Holk <eholk@mozilla.com> | 2011-06-21 18:08:34 -0700 |
|---|---|---|
| committer | Graydon Hoare <graydon@mozilla.com> | 2011-06-27 09:58:39 -0700 |
| commit | 6367bcf4276c06d41b0d66f10711ca3b076ae547 (patch) | |
| tree | 14f52a00319dcba17755330da3bcf978a53c0b3d /src/rt/rust_upcall.cpp | |
| parent | 4d99bf9af2107523c01566968e889c4f1a5de49e (diff) | |
| download | rust-6367bcf4276c06d41b0d66f10711ca3b076ae547.tar.gz rust-6367bcf4276c06d41b0d66f10711ca3b076ae547.zip | |
Fixed a few concurrency bugs. Still not perfect, but overall it seems much more reliable.
Diffstat (limited to 'src/rt/rust_upcall.cpp')
| -rw-r--r-- | src/rt/rust_upcall.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/rt/rust_upcall.cpp b/src/rt/rust_upcall.cpp index 7fb6bc4c84d..ba29203ca1d 100644 --- a/src/rt/rust_upcall.cpp +++ b/src/rt/rust_upcall.cpp @@ -223,9 +223,12 @@ upcall_recv(rust_task *task, uintptr_t *dptr, rust_port *port) { // on the port. Remember the rendezvous location so that any sender // task can write to it before waking up this task. - LOG(task, comm, "<=== waiting for rendezvous data ==="); - task->rendezvous_ptr = dptr; - task->block(port, "waiting for rendezvous data"); + { + scoped_lock sync(port->lock); + LOG(task, comm, "<=== waiting for rendezvous data ==="); + task->rendezvous_ptr = dptr; + task->block(port, "waiting for rendezvous data"); + } task->yield(3); } |
