julia
c6ccf20e - Mention Base.Lockable in "multi-threading.md" (#58107)

Commit
60 days ago
Mention Base.Lockable in "multi-threading.md" (#58107) When I originally learned about multithreading and locks (and ended up rewriting [https://docs.julialang.org/en/v1/manual/multi-threading/#man-using-locks](Using locks to avoid data-races)), I was puzzled to find that the association of a lock and a value was the mental task of the programmer, and not the programmatic task of the program. I made that explicit in that section of the manual, writing the following: > Note that the link between a lock and a variable is made by the programmer, and not the program. I was therefore very happy to see Base.Lockable introduced in Julia 1.11. What was missing, was any mention of it in the relevant section of the manual. This PR adds a subsection under locks (So a forth level of headings, not sure if that is fine), showcasing and reccomending the use of Base.Lockable. I have made heavy use of comments in the example, which breaks with the general style, but adds valuable interpretation along the way. I am very open restructuring that part in particular. --------- Co-authored-by: Chengyu Han <cyhan.dev@outlook.com> Co-authored-by: Neven Sajko <4944410+nsajko@users.noreply.github.com> Co-authored-by: Oscar Smith <oscardssmith@gmail.com>
Author
Parents
Loading