Hi,

2013/5/21 <[email protected]>

> But Rust uses green thread, which means it's possible that multiple tasks
> may run on a thread.
>
> 1. Task A calls function core::os::X. The system call fails and sets errno
> 2. Meanwhile (on the same thread) Task B is switched in and calls
> core::os::Y. The system call fails and replaces the errno set from task A.
>

AFAIK that's not supposed to happen if task A checks errno (or other
thread-local value) immediately after returning from the failed call. Tasks
are switched cooperatively within the scheduler thread.

Hope this helps,
  Mikhail
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to