Click here to Skip to main content
15,886,724 members
Articles / General Programming

Build the Forest in Python Series: Make the Forest Thread-Safe

Rate me:
Please Sign up or sign in to vote.
4.73/5 (4 votes)
27 Jan 2022CPOL13 min read 8K   6  
Use Python to build atomic binary trees
Shared state and data among threads become vulnerable to corruption if shared state or data is mutable. When multiple threads perform insertion or deletion simultaneously, trees are potentially corrupted or built incorrectly. This article shows how to make trees thread-safe; and also discusses the impact of doing so.

Views

Daily Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
United States United States
My name is Shun. I am a software engineer and a Christian. I currently work at a startup company.
My Website: https://formosa1544.com
Email: shun@formosa1544.com

Comments and Discussions