From 8e676db633aa8888c8408a91ef219d2261ef42e2 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 17 Oct 2013 18:42:14 +0200 Subject: Thread/Thread: replacement library for GThread --- src/DecoderControl.cxx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/DecoderControl.cxx') diff --git a/src/DecoderControl.cxx b/src/DecoderControl.cxx index 07f6f9fde..330c791dd 100644 --- a/src/DecoderControl.cxx +++ b/src/DecoderControl.cxx @@ -27,8 +27,7 @@ #include decoder_control::decoder_control() - :thread(nullptr), - state(DecoderState::STOP), + :state(DecoderState::STOP), command(DecoderCommand::NONE), song(nullptr), replay_gain_db(0), replay_gain_prev_db(0), @@ -124,13 +123,12 @@ decoder_control::Seek(double where) void decoder_control::Quit() { - assert(thread != nullptr); + assert(thread.IsDefined()); quit = true; LockAsynchronousCommand(DecoderCommand::STOP); - g_thread_join(thread); - thread = nullptr; + thread.Join(); } void -- cgit v1.2.3