git » swiftpm » main » tree

[main] / Sources / c_snikket / iinclude / sys / thread / FixedThreadPool.h

// Generated by Haxe 4.3.3
#ifndef INCLUDED_sys_thread_FixedThreadPool
#define INCLUDED_sys_thread_FixedThreadPool

#ifndef HXCPP_H
#include <hxcpp.h>
#endif

#ifndef INCLUDED_sys_thread_IThreadPool
#include <sys/thread/IThreadPool.h>
#endif
HX_DECLARE_CLASS2(sys,thread,Deque)
HX_DECLARE_CLASS2(sys,thread,FixedThreadPool)
HX_DECLARE_CLASS2(sys,thread,IThreadPool)
HX_DECLARE_CLASS3(sys,thread,_FixedThreadPool,Worker)

namespace sys{
namespace thread{


class HXCPP_CLASS_ATTRIBUTES FixedThreadPool_obj : public ::hx::Object
{
	public:
		typedef ::hx::Object super;
		typedef FixedThreadPool_obj OBJ_;
		FixedThreadPool_obj();

	public:
		enum { _hx_ClassId = 0x654fb1c3 };

		void __construct(int threadsCount);
		inline void *operator new(size_t inSize, bool inContainer=true,const char *inName="sys.thread.FixedThreadPool")
			{ return ::hx::Object::operator new(inSize,inContainer,inName); }
		inline void *operator new(size_t inSize, int extra)
			{ return ::hx::Object::operator new(inSize+extra,true,"sys.thread.FixedThreadPool"); }
		static ::hx::ObjectPtr< FixedThreadPool_obj > __new(int threadsCount);
		static ::hx::ObjectPtr< FixedThreadPool_obj > __alloc(::hx::Ctx *_hx_ctx,int threadsCount);
		static void * _hx_vtable;
		static Dynamic __CreateEmpty();
		static Dynamic __Create(::hx::DynamicArray inArgs);
		//~FixedThreadPool_obj();

		HX_DO_RTTI_ALL;
		::hx::Val __Field(const ::String &inString, ::hx::PropertyAccess inCallProp);
		::hx::Val __SetField(const ::String &inString,const ::hx::Val &inValue, ::hx::PropertyAccess inCallProp);
		void __GetFields(Array< ::String> &outFields);
		static void __register();
		void __Mark(HX_MARK_PARAMS);
		void __Visit(HX_VISIT_PARAMS);
		bool _hx_isInstanceOf(int inClassId);
		void *_hx_getInterface(int inHash);
		::String __ToString() const { return HX_("FixedThreadPool",3a,33,5e,cc); }

		int threadsCount;
		bool _isShutdown;
		::Array< ::Dynamic> pool;
		 ::sys::thread::Deque queue;
		void run( ::Dynamic task);
		::Dynamic run_dyn();

};

} // end namespace sys
} // end namespace thread

#endif /* INCLUDED_sys_thread_FixedThreadPool */