rust-lang / rust-lang/rfcs

Retrieve data and vtable from Waker

Open
#2,746 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-async-await AsyncAwait-Triaged T-libs
Dominant language
Markdown
Stars
6.6k
Forks
1.7k
Avg merge
16h 14m
Merged PRs (30d)
1

Description

Currently, you can use RawWaker::new to create a RawWaker from a data pointer and vtable pointer, and you can use Waker::from_raw to create a Waker from a RawWaker.

But there are no APIs to perform either conversion in the opposite direction. Why not?

Retrieving the data and vtable pointer would be particularly useful for a Future that expects to be run on a particular executor: it could downcast the data pointer to perform custom operations on it, after verifying that the vtable pointer was an expected value.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing RawWaker::new and Waker::from_raw APIs described in the issue, then investigate the safety and ownership implications of exposing the data and vtable pointers. Done means reaching a documented API design that addresses validation and executor-specific use cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.