git » swiftpm » main » tree

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

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

#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,ElasticThreadPool)
HX_DECLARE_CLASS2(sys,thread,IThreadPool)
HX_DECLARE_CLASS2(sys,thread,Mutex)
HX_DECLARE_CLASS3(sys,thread,_ElasticThreadPool,Worker)

namespace sys{
namespace thread{


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

	public:
		enum { _hx_ClassId = 0x4a20aa6c };

		void __construct(int maxThreadsCount,::hx::Null< Float >  __o_threadTimeout);
		inline void *operator new(size_t inSize, bool inContainer=true,const char *inName="sys.thread.ElasticThreadPool")
			{ 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.ElasticThreadPool"); }
		static ::hx::ObjectPtr< ElasticThreadPool_obj > __new(int maxThreadsCount,::hx::Null< Float >  __o_threadTimeout);
		static ::hx::ObjectPtr< ElasticThreadPool_obj > __alloc(::hx::Ctx *_hx_ctx,int maxThreadsCount,::hx::Null< Float >  __o_threadTimeout);
		static void * _hx_vtable;
		static Dynamic __CreateEmpty();
		static Dynamic __Create(::hx::DynamicArray inArgs);
		//~ElasticThreadPool_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_("ElasticThreadPool",db,96,d3,e0); }

		int maxThreadsCount;
		bool _isShutdown;
		::Array< ::Dynamic> pool;
		 ::sys::thread::Deque queue;
		 ::sys::thread::Mutex mutex;
		Float threadTimeout;
		void run( ::Dynamic task);
		::Dynamic run_dyn();

};

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

#endif /* INCLUDED_sys_thread_ElasticThreadPool */