{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreiesvdqp26frfnof3gov77z4lqftan3uvy2dpfiyxmwojtdzrne3ka",
    "uri": "at://did:plc:ivbknywyskln22er3nkssdhl/app.bsky.feed.post/3mjbkjilsp5p2"
  },
  "path": "/t/going-from-asyncwrite-to-asyncread/24130#post_4",
  "publishedAt": "2026-04-11T10:39:30.000Z",
  "site": "https://internals.rust-lang.org",
  "tags": [
    "the classic FutureLock bug"
  ],
  "textContent": "It's certainly an interesting abstraction. I was going to say that we could add one to tokio-util, and that you could ask the futures-util maintainers about that too. But:\n\nThinking a bit more about it, it does suffer one challenge, which is that when you stop reading, the internal future just stops running. If the internal future holds a mutex or semaphore or similar, then you could get a deadlock. That would be another instance of the classic FutureLock bug. I'm not sure I want to add any more abstractions with this problem.\n\nSpawning solves that problem, though.",
  "title": "Going from AsyncWrite to AsyncRead"
}