Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@jczuchnowski
Copy link
Member

First PR after 1.0.0 release 🦾

As the title says, adds reporting root fibers to the Supervisor. Based on a similar code in FiberContext.fork https://github.com/zio/zio/blob/master/core/shared/src/main/scala/zio/internal/FiberContext.scala#L720

Needed for ZIO-ZMX.

@adamgfraser
Copy link
Contributor

Can't you already do this with Runtime.mapPlatform(_.withSupervisor(_ => zmxSupervisor))?

@jczuchnowski
Copy link
Member Author

I can. But it's a different problem. Right now fibers are reported only when forked. Supervisor doesn't get notified about the root fiber.
In practice I'm ending up with a list of fibers with the parentId = 0, but I have no fiber 0.

@adamgfraser
Copy link
Contributor

Got it! Looks great!

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.

2 participants