diff options
author | Jarek Kobus <jaroslaw.kobus@qt.io> | 2021-08-13 13:15:09 +0200 |
---|---|---|
committer | Jarek Kobus <jaroslaw.kobus@qt.io> | 2021-08-17 12:23:39 +0000 |
commit | 7726267d071cb0c3d6dfad8ee4d1551140fcb06a (patch) | |
tree | 1666eee59fe67334cbd8e1e32677590e3559451f /src/plugins/vcsbase/vcsbaseplugin.cpp | |
parent | 59c01481d1d84a77fde8a058b531203f614c98c2 (diff) | |
download | qt-creator-7726267d071cb0c3d6dfad8ee4d1551140fcb06a.tar.gz |
Fix a deadlock when doStart() is called from launcher's thread
In case when QtcProcess::start() is being called very early,
just after the launcher socket was started but not ready yet,
a start is being delayed. In this case doStart() isn't
called directly from the caller's thread, but it will be
invoked later from the launcher's thread, when the socket is ready.
In this case we may have a deadlock, since calling
doStart(), sendPacket(), sendData() and finally handleRequests()
results in a synchonous chain of calls in launcher's thread,
so the mutex locked in sendData() will block synchronous call to
handleRequests(). In order to fix it we unlock the mutex
in sendData() before calling handleRequests().
Change-Id: I6c13994d0b05b624567c75ffbd2ac7cc0d77df61
Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'src/plugins/vcsbase/vcsbaseplugin.cpp')
0 files changed, 0 insertions, 0 deletions