Problem I have updated my previous code with the suggestions. I have also implemented concurrency to speed up the results. […]
Tag: concurrency
Capture some state in Haskell
Problem I want to capture some state in a Haskell function. For instance, I have many thread trying to print […]
Replacing Synchronization with Atomics
Problem I have tried to make modification in below specified code by removing synchronized and replacing Integer with AtomicInteger . […]
Parallel brute-force solution for Project Euler 4 (Largest palindrome product)
Problem The pe4Concurrent.go file given below is my first attempt at writing a concurrent programme, pe4.go is a non-concurrent implementation […]
Performing tasks concurrently
Problem I made a class to perform tasks concurrently and have implemented it. From appearances and testing, everything seems to […]
Find pairs of consecutive numbers fetched from blocking queues
Problem I was coding for the following programming question: Suppose you have two independent blocking queues that will keep getting […]
Go grep command clone
Problem I am trying to make a simple clone of the command line utility grep. I’m working on it just […]
Constant keys thread safe dictionary
Problem I find that I use this pattern a lot where I have a dictionary which I would only read […]
Blocking builder with singleton
Problem I am trying to implement a singleton builder that would be shared across multiple builder threads for Coordinate objects. […]
Updating number of article views – potential concurrent access issue?
Problem I have articles on my website (built in PHP) and when an article is viewed the number of views […]