#pragma once
#include <thread>
#include "vulkanapi/vulkan.h"
#include "zthread/channel.h"
namespace vulkanapi {
	class CommandThreadWorker {
	protected:
		std::thread mThread;
		string mName;
		zstd::channel<voidFn> mChannel;
		std::binary_semaphore mSemaphore;
	protected:
		void workloop();
	public:
		CommandThreadWorker(const string name, int buffer);
		~CommandThreadWorker();

		void Invoke(voidFn fn);
		void SyncInvoke(voidFn fn);
	};
};
