cv::VideoCapture stopped working in separate threads

For test purpose i use the same camera from my laptop, it has index = 0, in v.2.4.1 it work without problems i can see a videocapture in two different windows from one camera., but in v.4.8.1 i can see a videocapture only in one window, besides if i start and stop the program it can be “window1” or “window2” any time it different, but never in two windows simultaneosly