Skip to content

What is the function of 'lock' in rehash_kernel_for_fast_mode? #237

@9syj

Description

@9syj

lock<Mutex, TILE_SIZE>(g, table->locks[bkt_idx]);

I am reading the code for the reserve interface.
Under what circumstances might multiple threads compete for the same bucket lock?
It seems that there is no such lock contention within the same kernel. So, could there be scenarios where multiple rehash_kernel_for_fast_mode kernels run in parallel?

I can't figure out how it works. Could someone help me?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions