Optimizations

Do we need lambdas? No One knows what std function does internally.  At least it allocates memory and we should set allocator for it.



> On 20 Nov 2014, at 12:16, Mikulas Florek <notifications@github.com> wrote:
> 
> In src/core/MTJD/generic_job.h:
> 
> > +	class GenericJob : public MTJD::Job
> > +	{
> > +		public:
> > +			GenericJob(IAllocator& allocator, MTJD::Manager& manager, T function)
> > +				: MTJD::Job(true, MTJD::Priority::Normal, false, manager, allocator)
> > +				, m_function(function)
> > +			{
> > +			}
> > +
> > +			virtual void execute() override
> > +			{
> > +				m_function();
> > +			}
> > +
> > +		private:
> > +			std::function<void()> m_function;
> Ups, I forgot to create a task for this. Delegate can not be used, because it does not work with labdas with captures
> 
> —
> Reply to this email directly or view it on GitHub.
>