summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--full_update_generator.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/full_update_generator.cc b/full_update_generator.cc
index 311cc28a..4e7e0e4c 100644
--- a/full_update_generator.cc
+++ b/full_update_generator.cc
@@ -70,7 +70,9 @@ class ChunkProcessor {
};
bool ChunkProcessor::Start() {
- thread_ = g_thread_create(ReadAndCompressThread, this, TRUE, NULL);
+ // g_thread_create is deprecated since glib 2.32. Use
+ // g_thread_new instead.
+ thread_ = g_thread_try_new("chunk_proc", ReadAndCompressThread, this, NULL);
TEST_AND_RETURN_FALSE(thread_ != NULL);
return true;
}