Pretty Simple Question. How to fill a canvas.
# Single Threaded Algorism.
It can be shown as:
state class (To store the state)
# Multiple Threaded Algorism.
It is interesting that in my benchmark, MT code is about 50% slower than ST code. I believe the reason is that the time was spent on Context Switching, Blocking Queue synchronization, etc.
I am trying to improve the MT code.