]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
common/thread: Fix race condition in make_named_thread 31057/head
authorAdam C. Emerson <aemerson@redhat.com>
Tue, 22 Oct 2019 15:39:20 +0000 (11:39 -0400)
committerAdam C. Emerson <aemerson@redhat.com>
Wed, 23 Oct 2019 00:50:56 +0000 (20:50 -0400)
commit2bd106ec0da52e7fcf616d7b3cb20d570c1a5c50
treeea1da2da7f835c74e03b5afc38c338e414c9aef2
parent2fbe8267b62d6afe9a7f7c743d0f05a2348bab4f
common/thread: Fix race condition in make_named_thread

The thread may well no longer exist by the time we try to set the
name, so have the thread set its own name first thing.

Thanks to Ilya Dryomov <idryomov@gmail.com> for pointing it out.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
src/common/Thread.h