<commit_before>/*
 * Thread.cpp
 *
 */

#include "ThreadBoost.h"
#include <iostream>

namespace Nektar
{
    namespace Thread
    {

    	std::string ThreadManagerBoost::className =
    		GetThreadManager().RegisterCreatorFunction("ThreadManagerBoost",
    				ThreadManagerBoost::create, "Threading using Boost.");


        ThreadManagerBoost::~ThreadManagerBoost()
        {
            // This is an immediate teardown.  We attempt to kill everything.
            // we daren't lock anything as we may cause a deadlock
            std::cerr << "exiting threadmanager" << std::endl;
            for (unsigned int i=0; i<m_numThreads; i++)
            {
                m_threadList[i]->stop();
            }
        
            for (unsigned int i=0; i<m_numThreads; i++)
            {
                m_threadThreadList[i]->join();
                std::cerr << "joined " << i << std::endl;
                delete m_threadThreadList[i];
                delete m_threadList[i];
            }
        <commit_msg>Cleaned up destruction of ThreadManagerBoost, which now always occurs thanks to boost::shared_ptr.<commit_after>/*
 * Thread.cpp
 *
 */

#include "ThreadBoost.h"
#include <iostream>

namespace Nektar
{
    namespace Thread
    {

    	std::string ThreadManagerBoost::className =
    		GetThreadManager().RegisterCreatorFunction("ThreadManagerBoost",
    				ThreadManagerBoost::create, "Threading using Boost.");


        ThreadManagerBoost::~ThreadManagerBoost()
        {
            // This is an immediate teardown.  We attempt to kill everything.
            // we daren't lock anything as we may cause a deadlock
            for (unsigned int i=0; i<m_numThreads; i++)
            {
                m_threadList[i]->stop();
            }

            m_masterQueueCondVar.notify_all();
            m_masterActiveCondVar.notify_all();
            for (unsigned int i=0; i<m_numThreads; i++)
            {
                m_threadThreadList[i]->join();
                delete m_threadThreadList[i];
                delete m_threadList[i];
            }
        
{'fraction_non_alphanumeric': 0.10571840461316674, 'fraction_numerical': 0.0019221528111484864, 'mean_word_length': 1.9785407725321889, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3099465', 'n_tokens_mistral': 599, 'n_tokens_neox': 578, 'n_words': 133}