QNetworkAccessManager from ThreadPool

后端 未结 2 457
-上瘾入骨i
-上瘾入骨i 2021-01-19 19:20

A very fundamental question. The documentation mentions that all methods in QNetworkAccessManager are reentrant. If so, is performing a get() metho

2条回答
  •  滥情空心
    2021-01-19 19:49

    From the Qt documentation:

    [...] a class is said to be reentrant if its member functions can [simultaneously] be called safely from multiple threads, as long as each thread uses a different instance of the class.

    Since you're using a different instance each time (the one you create on the stack in run()), you're on the safe side.

提交回复
热议问题