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
pull/2/head
Davis King 16 years ago
parent cae50cb854
commit 6c22a6dd36

@ -15,11 +15,6 @@
using namespace dlib; 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 // 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 // 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 // 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. // documentation and examples for detailed information regarding its use.
logger dlog("main"); logger dlog("main");
// Here we make an instance of the thread pool object
thread_pool tp(3);
// ---------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------
class test class test

Loading…
Cancel
Save