Implementing tre

I am trying to implement non blocking avl tree. where should i start.

2 Likes

Read about AVL tree

An implementation in Go
https://gist.github.com/lidashuang/9327631

What could be blocking to an avl tree anyway?

3 Likes

I guess he want to implement an avl tree supporting concurrent insertion, deletion and queries without using a mutex to lock before and after operations.

A non-blocking avl tree would for instance allow to have an insertion in progress while another go routine may query values from it. Concurrent insertion and deletion looks more challenging.

To solve this problem I would search for a non-blocking avl tree implementation in another language (C, C++, Java) and translate it in Go. Non-blocking data structure is complex and difficult to get right.

2 Likes

Maybe thread safety data structures :slight_smile:

Although, not Go related
https://docs.microsoft.com/en-us/dotnet/standard/collections/thread-safe/

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.