Open hariprasadraja opened 3 years ago
So the intention of poping out from same go routine is that I want to do the communication with "executeTask" goroutine using channel. If I wouldn't have popped over here, another approach would have been popping out tasks in "executeTask" go routine itself but in this case I would have required to use mutex for guarding pq and drop the usage of channel.
What operation you are going to perform after pop and before push is the key thing. execute task does justify it's responsibility.
Can you do push and pop with separate go routine ?