Skip to content

unable to use poll_next() from Channel's Stream impl (with futures_core enabled, possibly two runtimes conflict?) #33

@smokytheangel0

Description

@smokytheangel0

Describe the bug
Unable to use .poll_next() on a Channel<Option>.

To Reproduce
Steps to reproduce the behavior:

  1. Add crate whisk, version 0.11.0, with features futures_core
  2. Add crate tokio, version 1.28.2, features: rt-multi-thread, macros
  3. Create channel with Channel::new()
  4. clone channel and give clone to tokio async task (two runtimes?, am not using async::main)
  5. no method 'poll_next' found for struct 'Channel<Option>' (the original channel pointer)

Expected behavior
the method 'poll_next' returns an option within a for loop:
Some(VideoUpdate)
or None for channel has been cleared

Screenshots
If applicable, add screenshots to help explain your problem.
Screenshot from 2023-05-31 12-45-06

Desktop (please complete the following information):

  • OS: [e.g. iOS]
    Linux 5.15.0-71-generic #78~20.04.1-Ubuntu SMP Wed Apr 19 11:26:48 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Additional context
I am pretty new to programming but I imagine there could be some conflicts between two async runtimes pasts and tokio,
I aim for my crate to be easily made nostd, but also trying to balance that with readability to a client who does not understand
the details, so using tokio's task and writing it like a thread spawn with task::spawn is very nice, and I would love to be able to
understand more about how I would create a similar interface using only pasts as nostd is the end goal.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions