From 6c22a6dd36ad91a88b4c160ab2ac38f8a9287622 Mon Sep 17 00:00:00 2001 From: Davis King Date: Sun, 25 Jan 2009 22:14:15 +0000 Subject: [PATCH] Switched the dlog and tp objects so that their destruction orders are safer. This only matters if the user were to modify the example such that tasks were still running after main() ends. --HG-- extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402839 --- examples/thread_pool_ex.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/thread_pool_ex.cpp b/examples/thread_pool_ex.cpp index a3a8e9d77..dc8ffcfa8 100644 --- a/examples/thread_pool_ex.cpp +++ b/examples/thread_pool_ex.cpp @@ -15,11 +15,6 @@ using namespace dlib; - -// Here we make an instance of the thread pool object -thread_pool tp(3); - - // We will be using the dlib logger object to print out messages in this example // because its output is timestamped and labeled with the thread that the log // message came from. So this will make it easier to see what is going on in @@ -27,6 +22,11 @@ thread_pool tp(3); // documentation and examples for detailed information regarding its use. logger dlog("main"); + +// Here we make an instance of the thread pool object +thread_pool tp(3); + + // ---------------------------------------------------------------------------------------- class test