Comment

Comment by dwattttt

The code linked does the following:

- attempt to acquire an RWLock without blocking

- if it does, wake the task waiting for the lock

- if it doesn't, return "not ready yet"

The RWLock is straight from the standard lib; there's no loop and no spinning involved. Every single Future you look at will look like this, by specification they cannot block, only return "ready" (and wake the task), or return "not ready".

parent dwattttt 2 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton