Comment by throwawaymaths
Comment by throwawaymaths 14 hours ago
how do you "fail to obtain the token"?
Comment by throwawaymaths 14 hours ago
how do you "fail to obtain the token"?
the io isnt a single resource? it's a module grouping together a pile of code. and you can swap out implementations. the io modules should be responsible for handing out many failable resources, and synchronization is going to be up to the io module code, and thats whether or not it's globalized or passed.
The token guards a fallible resource (I/O). You can (temporarily or permanently) fail to obtain it for any reason that would affect the underlying I/O.