Skip to content

feat: Add proper support for fibers#157

Open
farnoy wants to merge 1 commit into
nagisa:mainfrom
farnoy:add-fibers
Open

feat: Add proper support for fibers#157
farnoy wants to merge 1 commit into
nagisa:mainfrom
farnoy:add-fibers

Conversation

@farnoy

@farnoy farnoy commented Mar 15, 2026

Copy link
Copy Markdown

This still has all the downsides of thread migrations, but works well with single threaded executors. It was tested on tokio's current_thread.

Fixes #35

image

In the screenshot, I used it to prove that broadcasting on a channel -> yield does what I needed. It schedules the receivers to do synchronous try_io until EWOULDBLOCK 👌.

Implementation notes: I mostly copied all the boilerplate from plotting, and wired it up to tracing to capture by span name. Completely untested on multithreaded schedulers, I assume it succeeds in capturing but is nonsensical around thread migrations. This was already a problem though, I don't think this change regresses on that.

This still has all the downsides of thread migrations, but works well
with single threaded executors. It was tested on tokio's current_thread.

Fixes nagisa#35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Try to use fiber support to implement proper support for non-hierarchical tracing spans

1 participant