Ah, yes I failed to see the warning in the documentation. add()ing the
handle after moving it into the hashmap does seem to make things better.
Thanks for your help!

Frank


On Wed, Apr 16, 2014 at 5:45 PM, Alex Crichton <a...@crichton.co> wrote:

> >   unsafe { h.add(); }
> >
> >   handles.insert(h.id(), h);
>
> This is why the add method is unsafe: "This method is unsafe because
> it requires that the Handle is not moved while it is added to the
> Select set."
>
> You're moving the handle after it's been added, which later will cause
> a segfault.
>
_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to