Skip to content

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
const _PADDING_TUPLE = ntuple(zero, 15)
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.

5 participants