Skip to content

Explore the power of Golang concurrency with a collection of hands-on projects! This repository is a playground for honing your skills in concurrent programming. Join the journey of discovery, contribute your insights, and let's build robust, parallel systems together.

License

Notifications You must be signed in to change notification settings

vasusheoran/concurrency

Repository files navigation

Concurrency Playground in Golang

Welcome to the Concurrency Playground repository! 🚀 This collection of Golang projects explores various aspects of concurrent programming, offering hands-on examples and implementations.

Projects

  1. Bounded Blocking Queue
    • A thread-safe, bounded blocking queue implementation for managing tasks in a concurrent environment. (Difficulty: Medium)
    • Leetcode Challenge
  2. Rides
    • Simulates a scenario where Democrats and Republicans order Uber rides, considering specific conditions to prevent conflicts. (Difficulty: Hard)
  3. BuildingH2O
    • Demonstrates concurrent molecule creation using Go routines and synchronization primitives, simulating the formation of water molecules (H2O). (Difficulty: Medium)
    • Leetcode Challenge
  4. Dining Philosophers
    • Implements the classic Dining Philosophers problem using Go concurrency features, exploring synchronization techniques for resource sharing. (Difficulty: Medium)
    • Leetcode Challenge
  5. FizzBuzz
    • Implements the classic FizzBuzz problem concurrently, printing numbers divisible by 3 as "Fizz", divisible by 5 as "Buzz", and divisible by both as "FizzBuzz". (Difficulty: Easy)
    • Leetcode Challenge
  6. FooBar
    • Implements a concurrent solution to the FooBar problem, where two goroutines take turns printing "Foo" and "Bar" in a specific order. (Difficulty: Easy)
    • Leetcode Challenge
  7. PrintOrder
    • Demonstrates synchronization techniques using goroutines and channels to ensure a specific order of printing messages from multiple concurrent routines.(Difficulty: Medium)
    • Leetcode Challenge
  8. RateLimiter
    • Provides a thread-safe implementation for rate limiting functions based on leaky bucket algorithm, allowing control over the number of allowed calls within a defined time window. (Difficulty: Easy)
  9. ReaderWriter
    • Offers a package for managing concurrent read and write access to shared data using read-write locks and optional channels for synchronization. (Difficulty: Medium)
  10. SafeMap
    • Implements a thread-safe map structure that allows concurrent access and modification of key-value pairs without data races. (Difficulty: Medium)
  11. ScheduleTasks
    • Demonstrates scheduling tasks for execution at specific times or intervals using concurrency primitives like timers or goroutines. (Difficulty: Medium)

Usage

Import concurrency module

go get -u github.com/vasusheoran/concurrency@latest

Explore Sub-Projects

Navigate to individual sub-projects to explore their README files and code.

Contributing

Feel free to contribute, report issues, or suggest improvements. Your insights and ideas are highly appreciated.

License

This repository is licensed under the MIT License.

About

Explore the power of Golang concurrency with a collection of hands-on projects! This repository is a playground for honing your skills in concurrent programming. Join the journey of discovery, contribute your insights, and let's build robust, parallel systems together.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages