Follows up #2364 where we discussed that we might want to have a test which has really short thread function and creates many threads.
We need to make a test that runs longer than the tests we had before to check some problems that might happen after running for some time (e.g. memory corruption or something else).