<commit_before>#include "core/lumix.h"
#include "core/MTJD/group.h"
#include "core/mt/atomic.h"

namespace Lumix
{
	namespace MTJD
	{
		Group::Group(bool sync_event)
			: BaseEntry(0, sync_event)
		{
		}

		Group::~Group()
		{
		}

		void Group::addStaticDependency(BaseEntry* entry)
		{
#if TYPE == MULTI_THREAD

			m_static_dependency_table.push(entry);
			if (m_dependency_count > 0)
			{
				entry->incrementDependency();
			}

#endif //TYPE == MULTI_THREAD
		}

		void Group::incrementDependency()
		{
#if TYPE == MULTI_THREAD

			uint32_t count = MT::atomicIncrement(&m_dependency_count);
			if (1 == count)
			{
				dependencyNotReady();
			}

#endif //TYPE == MULTI_THREAD
		}

		void Group::decrementDependency()
		{
#if TYPE == MULTI_THREAD

			uint32_t count = MT::atomicDecrement(&m_dependency_count);
			if (0 == count)
			{
				dependencyReady();
			}

			ASSERT(0 <= count);

#endif //TYPE == MULTI_THREAD
		}

		void Group::dependencyNotReady()
		{<commit_msg>fixes #314<commit_after>#include "core/lumix.h"
#include "core/MTJD/group.h"
#include "core/mt/atomic.h"

namespace Lumix
{
	namespace MTJD
	{
		Group::Group(bool sync_event)
			: BaseEntry(0, sync_event)
		{
		}

		Group::~Group()
		{
		}

		void Group::addStaticDependency(BaseEntry* entry)
		{
#if TYPE == MULTI_THREAD

			m_static_dependency_table.push(entry);
			if (m_dependency_count > 0)
			{
				entry->incrementDependency();
			}

#endif //TYPE == MULTI_THREAD
		}

		void Group::incrementDependency()
		{
#if TYPE == MULTI_THREAD

			int32_t count = MT::atomicIncrement(&m_dependency_count);
			if (1 == count)
			{
				dependencyNotReady();
			}

#endif //TYPE == MULTI_THREAD
		}

		void Group::decrementDependency()
		{
#if TYPE == MULTI_THREAD

			int32_t count = MT::atomicDecrement(&m_dependency_count);
			if (0 == count)
			{
				dependencyReady();
			}

			ASSERT(0 <= count);

#endif //TYPE == MULTI_THREAD
		}

		void Group::dependencyNotReady()
		{
{'fraction_non_alphanumeric': 0.14227015921931177, 'fraction_numerical': 0.01078582434514638, 'mean_word_length': 3.5514018691588785, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '6309149', 'n_tokens_mistral': 870, 'n_tokens_neox': 717, 'n_words': 127}