Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

IIRC it is just having locks with exclusive constructors, which take previous locks’ guards (by ownership?).

That way you can never lock lock B if you have not received a guard aka lock from lock A prior. Ensured on the type level.

I suppose doing this at scale is a real challenge.



The general term for this is "Session types." The Par crate is probably the most mature attempt at this to date.

https://github.com/faiface/par




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

Search: