Asynchronous and multi-threaded programming in MQL - page 10

 
Dmitry Fedoseev:

Dream... and be envious in silence.

And I can say it again:"There can't be more tasks processed at the same time than a processor has cores". If you think otherwise, I stand up and applaud.

That's why they invented asynchronous execution of tasks with control transfer context, according to FIFO rule (first come, first served).
EventLoop acts as a link to Thread Pool, for writing linear code in one thread.
That is, you write code as usual linearly in one thread, and EventLoop distributes the execution of tasks to the Thread Pool.
Which is just perfect for Expert Advisors and mql scripts running in one thread!
Everything is simple and straightforward.

Files:
gmgg488y.png  48 kb
 
Roman:

That's why they have invented asynchronous execution of tasks according to the FIFO rule (first come, first served).
EventLoop serves as a link to Thread Pool, for writing linear code in one thread.
That is, you write code as usual linearly in one thread, and EventLoop distributes the execution of tasks to the Thread Pool.
Which is just perfect for Expert Advisors and mql scripts running in one thread!
It's simple and straightforward.

Just like that - replace the usual word "orderly" with a cleverly contrived abbreviation FIFO and you get an impression... and there's even a whole article on wikipedia. Maybe we should create a scientific research institute on the subject?

Isn't there a code somewhere that's not written linearly?

But we can see progress all the same - Thread Pol has already appeared.

 
Dmitry Fedoseev:

Just like that - replace the usual word "orderly" with a cleverly contrived abbreviation FIFO and you get an impression... and there's even a whole article on wikipedia. Maybe we should create a scientific research institute on the subject?

Isn't there a code somewhere that's not written linearly?

FIFO (first in, first out) is just out of order, so get the gist of it ))

 
Roman:

FIFO (first come, first served) is just out of order, but get the point already))

Yes, that's right! It's time to organize a FIFO.

Of course, it's funny - first come, first served - this is not LIFO!

So LIFO is in order. Yes?

 
Dmitry Fedoseev:

Yes, that's right! It's time to organise a NIFIFO.

It's fun - first come, first served - that's NOT LIFO!

So LIFO is the order of the day. Yes?

LIFO or last in, first out, there is no order here either.
You are interpreting the order incorrectly, it should be interpreted as asynchronous order of arrival toThread Pol from EventLoop, not order of processing.
The processing order will depend on the tasks already received byThread Pol, i.e. asynchronously.
Thread Pol only executes them andEventLoop distributes them.

 
Roman:

LIFO or last in, first out (came last and was processed first) - there is no sequence here too.
You're interpreting the order incorrectly, it should be interpreted as asynchronous order of arrival to Thread Pol from EventLoop, not the order of processing.
The processing order will depend on the tasks already received by Thread Pol, i.e. asynchronously.
Thread Pol only executes them andEventLoop distributes them.

Original! Came, went, first, last - isn't that out of the order category?

What is "asynchronous order"? Is there also a synchronous order? And do you even know what you are arguing about? Or are you just going through familiar words? And create combinations of them with other familiar words.

And here is the meaning of this masterpiece by its depth of thought: "The order of processing will depend on tasks entered inThread Pol, i.e. asynchronously". explain. Do you understand it yourself?

"Thread Pol ...EventLoop" - you have a prioritization problem here.

 
Dmitry Fedoseev:

Original! Came, went, first, last - isn't that out of the order category?

What is "asynchronous order"? Is there also a synchronous order? And do you even know what you are arguing about? Or are you just going through familiar words?

And what is the meaning of this masterpiece by its depth of thought - "The order of processing will already depend on the tasks entered in Thread Pol, i.e. asynchronously"? explain. Do you understand it?

"Thread Pol ...EventLoop" - you have the problem of prioritization here.

I see it's useless to explain anything to you, you're on your own.
As they say, it's all on the net.
Good luck with that.

 
Roman:

I see it's useless to explain anything to you, you're on your own.
As they like to say, everything's online.
Good luck with that.

What can you explain? And nonsense - yes, there are on the web, we've seen better.

 
Dmitry Fedoseev:

What can you explain? And nonsense - yes, it's online, we've seen better.

It was clear from the beginning that for you it's all bullshit. ))
Other people successfully use asynchronous approach in their solutions )))

I hope the developers have heard the idea of Eventloop, and will implement it in the future.

 
Roman:

I hope the developers have heard Eventloop's idea, and will implement it in the future.

The future is already here.

MT has Eventloop.