On 11-05-25 02:42 PM, Mike Capp wrote:
On 25 May 2011 22:00, Graydon Hoare<[email protected]>  wrote:

This means that users never use threads for isolation (or if they do, it
doesn't work).

Possible counterexample: we use explicit and implicit TLS quite a bit
in (ASP.NET) server-side code; IIS has a thread-per-request model with
a long-running process. I imagine multiplexing FastCGI apps might do
something similar. Isolation per request-being-handled is a very
natural thing to want in that context, and in idiomatic Rust that
would presumably apply to a family of tasks rather than a single one.

I'm not sure what your criteria are for "doesn't work". I suspect it
works better than everyone rolling their own TLS implementation on top
of process-wide global state.

Sorry. The criteria for "doesn't work" is "isn't actually isolated"; it's idiomatic isolation, isolation-by-convention. The language isn't providing any help. Pointers in thread A can point into data currently operated-on by thread B, thus racing with B.

-Graydon

_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to