Hacker News new | past | comments | ask | show | jobs | submit login

Threads can be implemented as a library if the compiler and hardware don't perform any reordering of memory instructions.

It is hard to define what "ordering of memory operations" actually means if there is no memory model that takes multi-threading into account. Most styles of formal semantics will allow operations to be reordered as long as the final state is the same.

Atomicity and visibility are also an issue.

You still need synchronization instructions, but you can handle them through library function calls (i.e., you don't need to change the language specification for them).

Thats what C++ thought too :). I believe the whole point of this paper is to argue your point (minus the whole lets simplify the compiler so that it cant do a ton of optimizations part since nobody would agree to that)

Well, in my book correctness comes first. So if you want to do multi-threading without changing the language, then you'll have to fix the compiler (to make it preserve correctness).

C++ did change the language - its specification of correctness. The definition of what is correct well-defined behavior is part of the language.

Yes, the article is about not changing the language, though.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact