V1 crashes sometimes so somehow, the thread should be safer so that it will rarely crash or never.
After adding -pthread flag, it seems that it is a lot more stable. Not 100% sure for now.
Now, it is a lot better and crashing is quite rare. Still not 100% safe but good enough.
When width is 500, sometimes there is a deadlock so the program doesn't terminate at all.
More testing needed.
V1 crashes sometimes so somehow, the thread should be safer so that it will rarely crash or never. After adding
-pthread
flag, it seems that it is a lot more stable. Not 100% sure for now. Now, it is a lot better and crashing is quite rare. Still not 100% safe but good enough.When width is 500, sometimes there is a deadlock so the program doesn't terminate at all. More testing needed.