[ARCHIVE]Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Can't go anywhere without you - 5. - page 390

 
Integer:

See for yourself, but apparently not by sight. The sequence is ensured purely by chance because of the high speed of the processor and the fact that it performs a bunch of other guilty tasks in parallel.
The sequence is not important. All the accesses will be processed. The main thing is to reduce the time of access to the common resource.
 
Zhunko:
The sequence is not important. All appeals will be processed. The main thing is to reduce the time it takes to access a shared resource.

How is it not important? All tasks should be handled consistently and in order, not at the expense of "a coin flip" at some point.
 
Integer:
How is it not important? All tasks should be practised and consistently in order, not at the expense of "a coin flip" at some point.

This is the wrong approach. Write in such a way that the sequence of the queue is unimportant. You will avoid a lot of problems in writing and testing as well.
 
Zhunko:
This is the wrong approach. Write in such a way that the sequence of the queue is unimportant. You will avoid a lot of problems in writing and testing as well.



The order itself is not important, 1, 2, 3 or 1, 3, 2, but if you started in order 2, 3, 1, it should go this way. It will go that way on its own if you do it right.

 
Integer:



The order itself is not important, 1, 2, 3 or 1, 3, 2, but if you start in order 2, 3, 1, it should go this way. It will go that way on its own if you do it right.

Nah. Not important at all. Let it be random. That's fine, too.
 
Zhunko:
Nah. Not important at all. Let it be random. That's fine, too.

If it's random, there's no guarantee that some process won't be left out for a long time. Junko, it's clear - you haven't heard about it and can't do it in emcool or sipi. Programming languages were not invented by fools, especially sipi and provided appropriate tools and even the msdn showed an example of their use... Maybe you should go there, maybe you can teach them how to code.
 
Integer:
If it's random, there's no guarantee that some process won't be left out for a long time. Junko, it's clear - you have not heard about it and cannot do it either in Emcool or in Sipi. Programming languages were not invented by fools, especially sipi and provided appropriate tools and even the msdn showed an example of their use... Maybe you should go there, maybe you can teach them how to code.

What process? A stream, perhaps? If it is, it won't be left 'out of the loop'. See programming rules for multithreaded applications. Read the same Richter.

The programming languages do not have tools for synchronization (except for MQL4, which is a special case). You have to write them yourself.

Synchronisation objects are part of the system.

 
Integer:


You really have brain paralysis, or lack of some part of it. It's already been said that the system doesn't know which thread has really worked and which has gone to waste. But you're the only one who doesn't get what you're talking about and won't get it))))))))

It also looks like you've got the same pile of shared access to a single resource and the task you've outlined here is the sequential processing of multiple threads.

This is the wrong task. There should be no such thing. It's a mistake. It's not worth wasting your time on.
 
Zhunko:

1. Which process? A stream, perhaps? If it is, it won't be left 'out of the loop'. See programming rules for multithreaded applications. Read Richter, too.

2. There are no synchronization tools in programming languages (except for MQL4, which is a special case). You have to write them yourself.

3. the synchronisation objects are part of the system.


1. You're so stuck. Once again. The system has no way of knowing if a flow has been idle or if it has performed an action.

2. What a precision. Not in sipi, winapi functions. Actually, it doesn't matter to a sane person, because it's the principles themselves that are important.

3. yooo)))) Sounds like a magic spell.

 
Zhunko:
This is the wrong task. It shouldn't be like that. It's a mistake. It's not worth wasting your time on.


That's hilarious!