Fix issue 11519 - race in core.thread unit test
Merge pull request #728 from Safety0ff/fix11454

Fix issue 11519 - race in core.thread unit test