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

Skip to content

Conversation

@adamgfraser
Copy link
Contributor

Currently we compare fiber identifiers when identifying the common ancestor of two fibers. However, in certain circumstances the order of fiber identifiers could not reflect the order in which fibers were created, for example if the system time was changed.

Since we are looking for the common ancestor between two fibers, we can instead reason that up to the common ancestor the ancestry of the two fibers must be the same and thus must have the same depth. So instead of comparing fiber identifiers we can simply drop an element from the longest ancestry if we haven't gotten to a common ancestor yet, or both if the depth is the same and we haven't gotten to a common ancestor yet.

@adamgfraser adamgfraser requested a review from jdegoes August 19, 2023 22:07
@jdegoes jdegoes merged commit 36fa6e6 into zio:series/2.x Aug 20, 2023
@adamgfraser adamgfraser deleted the fiberrefs branch August 20, 2023 15:02
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