Asynchronous and multi-threaded programming in MQL - page 9

 
Roman:

That was just a guess, I haven't checked where it's used yet.
Googled what languages use EventLoop, it is Py, JS, Qt maybe in some more.
The point is not where it is applied but in the technology itself without using threads.
So why not borrow the technology and implement in mql your EventLoop?

You haven't checked? Can you test it?

How do you imagine asynchrony without threads? Can you put your trousers over your head too?

 
Dmitry Fedoseev:

You haven't checked? Can you test it?

How do you imagine asynchrony without threads? Can you put your trousers over your head too?

The developers know better, I think they know what I mean.
Probably yes, I misspoke, and Thread Pool is used and Callback is used to do the job.
And in this way writing asynchronous code in one thread Single Thread is achieved, and each request is considered as an event.

In testing on agents, I think Thread Pool is used, only for processes, it's very similar behavior.
For this reason the technology itself already exists in mql, just not developed for users, in writing asynchronous code.

Here's an understanding of how EventLoop works in Node.jsref
Here's how EventLoop works in asyncioref.

 
Roman:

...
Here's an insight into how EventLoop works in Node.js link
Here's how EventLoop works in asyncio ref.

Yeah I've already realised that you and all those asynchronous programming adepts are in the same thread and know how to put your trousers over your head.

***

I liked the other article about EventLoop better. I quote: "since most modern kernels are multi-threaded..." Didn't read any further - that was enough.

 
For this reason, I would like the developers to hear this suggestion, and develop their own EventLoop.
Then the Metatrader terminal will break everyone and everything, and it definitely will not be equal!
 
Roman:
That's why I'd like the developers to hear this suggestion, and develop their own EventLoop.
Then the Metatrader terminal will tear everyone and everything, and it won't be unequalled!

Forget the EventLoop. Bullshit. Show me how you put your trousers over your head.

***

Read a little on the subject, discussing how to get an interview with questions about EventLoop. Looks like it's some kind of python and j-nozzle fetish. It has nothing to do with reality.

***

Roman:

...

Here's an insight into how EventLoop works in Node.js ref
...

Let's read the article. At the beginning "NodeJS is a Single Thread application running on a platform written with C++, this platform uses Multi-Thread to execute tasks simultaneously".

Continue reading "As a C++ program, it supports Multi-Threads, so requests here will be handled by multiple threads. NodeJS also supports Multi Processes, it means they can be executed on a Core".

The question arises: "but what did the author of this article take when he wrote it?

 
Dmitry Fedoseev:

I liked the other article about EventLoop better. I quote: "since most modern kernels are multi-threaded..." Didn't read any further - that was enough.

The point is to allow the user to write asynchronous code in a single thread, as the Expert/Script works in a single thread.
And in the wilds of the terminal will already be working developed, not available to anyone from outside EventLoop !
This may be nonsense to you, I have a server written in Py usingEventLoop.
And processes more than a thousand tasks at a time asynchronously, that's your delusion, even though everyone thinks Py is slow.
Write asynchronously and you'll fly, I don't wear trousers over my head, I just use the right technology.

 

Another article on the subject: "Asynchronous code removes a blocking operation from the main program flow, so thatit continues to run, but somewhere else, and the handler can go on. Simply put, the main "process" puts a task and passes it on to another independent "process"." :)

Nah, turns out this quote is from this article:
Roman:

...
Here's how EventLoop works in asyncio link

There you go - the program continues to run somewhere else... and the handler stays here.

Haven't you understood yet that the author of this article has no skills at all in what he/she is speaking about? He should read something like "Windows Fundamentals" from the 90s.

Does he give the processor mystical powers in his articles, by any chance?

 
Roman:

...Just using the right technology.

If you still understood what you were using. If everything stayed in one thread (if that were possible), there would be no speed increase. The speed increase comes at the cost of creating a process and having it processed by another core.

Roman:

...
And more than a thousand tasks are processed asynchronously at a time, that's the nonsense, while everyone thinks Py is slow.
...

There can't be more tasks processed at the same time than there are cores in the processor.

 
Dmitry Fedoseev:

Another article on the subject: "Asynchronous code removes a blocking operation from the main program flow, so that it continues to run, but somewhere else, and the handler can go on. Simply put, the main "process" puts a task and passes it on to another independent "process"." :)

No, it turns out that quote is from this article:

There you go - the program continues to run somewhere else... and the handler stays here.

Haven't you understood yet that the author of this article has no skills at all in what he/she is speaking about? He should read something like "Windows Fundamentals" from the 90s.

Does he give the processor mystical powers in his articles, by any chance?

Thread Pool or Coroutines is used for this purpose, you just haven't studied this technology and didn't understand the whole point.
I have no desire to argue with you on this subject, this technology is successfully used in other languages and engines by the world's companies.
And what you find nonsense in the articles, apparently you have not yet realized how it all works in one thread)).

 
Roman:

That's what Thread Pool or Coroutines are used for, you just haven't studied the given technology and haven't understood the whole point to the end.
I have no desire to argue with you on this subject, this technology is successfully used in other languages and engines by the world's companies.
And what you find nonsense in the articles, apparently you have not yet realized how it all works in one thread)).

(Laughing): Whoa! The pressure by the authorities is on... also being somewhere out there with that code running somewhere out there))) Doesn't divine power apply?

The very expression "Thread Pool" implies the presence of several Threads.

To study technology... ...you should first master common sense.