<commit_before><?php
	declare(strict_types=1);

	namespace Edde\Common\Protocol;

	use Edde\Api\Job\LazyJobManagerTrait;
	use Edde\Api\Protocol\IElement;
	use Edde\Api\Protocol\IPacket;
	use Edde\Api\Protocol\IProtocolManager;
	use Edde\Api\Protocol\LazyProtocolServiceTrait;
	use Edde\Api\Thread\LazyThreadManagerTrait;
	use Edde\Common\Config\ConfigurableTrait;
	use Edde\Common\Object;

	abstract class AbstractProtocolManager extends Object implements IProtocolManager {
		use LazyProtocolServiceTrait;
		use LazyJobManagerTrait;
		use LazyThreadManagerTrait;
		use ConfigurableTrait;

		/**
		 * @inheritdoc
		 */
		public function createPacket(IElement $reference = null): IPacket {
			$packet = $this->protocolService->createPacket($reference);
			foreach ($this->jobManager->dequeue() as $element) {
				$packet->element($element);
			}
			return $packet;
		}

		/**
		 * @inheritdoc
		 */
		public function execute(IElement $element): IElement {
			if ($element->isAsync()) {
				$this->jobManager->queue($element);
				$this->threadManager->execute();
				return $this->protocolService->createPacket($element);
			}
			return $this->protocolService->execute($element);
		}
	}
<commit_msg>- ok, protocol manager cannot execute thread manager<commit_after><?php
	declare(strict_types=1);

	namespace Edde\Common\Protocol;

	use Edde\Api\Job\LazyJobManagerTrait;
	use Edde\Api\Protocol\IElement;
	use Edde\Api\Protocol\IPacket;
	use Edde\Api\Protocol\IProtocolManager;
	use Edde\Api\Protocol\LazyProtocolServiceTrait;
	use Edde\Common\Config\ConfigurableTrait;
	use Edde\Common\Object;

	abstract class AbstractProtocolManager extends Object implements IProtocolManager {
		use LazyProtocolServiceTrait;
		use LazyJobManagerTrait;
		use ConfigurableTrait;

		/**
		 * @inheritdoc
		 */
		public function createPacket(IElement $reference = null): IPacket {
			$packet = $this->protocolService->createPacket($reference);
			foreach ($this->jobManager->dequeue() as $element) {
				$packet->element($element);
			}
			return $packet;
		}

		/**
		 * @inheritdoc
		 */
		public function execute(IElement $element): IElement {
			if ($element->isAsync()) {
				$this->jobManager->queue($element);
				return $this->protocolService->createPacket($element);
			}
			return $this->protocolService->execute($element);
		}
	}

{'fraction_non_alphanumeric': 0.1261300043047783, 'fraction_numerical': 0.0008609556607834697, 'mean_word_length': 4.586538461538462, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 29, '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': '4327875', 'n_tokens_mistral': 810, 'n_tokens_neox': 714, 'n_words': 133}