Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP workstealing scheduler + refactor for easier experimentation #55542

Draft
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

gbaraldi
Copy link
Member

This currently doesn't work. I assume the bug is on the queue because I'm getting task already running errors.


mutable struct Node{T}
const value::Union{T, Nothing}
@atomic next::Union{Node{T}, Nothing}
Copy link
Contributor

@Seelengrab Seelengrab Aug 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can make this type stable by having next and prev point to the current node in case there is no next/previous node.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh cool. This will all need some fine comb optimizations for sure.

@vchuravy vchuravy marked this pull request as draft August 26, 2024 15:57
mutable struct ConcurrentDoublyLinkedList{T}
@atomic header::Union{Node{T}, Nothing}
@atomic header::Union{Node{T}, Nothing} # 8 bytes
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4 byte on 32 bit, right?

@giordano giordano added the multithreading Base.Threads and related functionality label Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
multithreading Base.Threads and related functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants