hyperium / hyperium/hyper

ffi: different input and output types for tasks

Open
#3,445 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-ffi C-feature
Dominant language
Rust
Stars
16.3k
Forks
1.8k
Avg merge
1d 22h
Merged PRs (30d)
14

Description

When documenting the FFI API (#3424), one thing I found confusing is that the *hyper_task type has two different purposes:

  1. It can be added to an executor to be polled.
  2. Eventually it will be returned from hyper_executor_poll.

For (2), it will have a type and a value. For (1), it won't yet have a value. Will it have a type?

For (2), is it possible to put the same task back into the executor? I think the answer is no.

I think it would be clearer to split this into two types: *hyper_task, and *hyper_task_result, corresponding to (1) and (2) respectively.

Contributor guide

Open the contributing guide

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 FFI API discussion in #3424 and the uses of *hyper_task with hyper_executor_poll. Determine whether separate task and task-result types are needed and how reinsertion should work. Done means the API design is resolved and its documentation accurately describes the input and output types.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.