Home > Net >  C # events more synchronous coordination problems, most of us have any
C # events more synchronous coordination problems, most of us have any

Time:11-29

In practice, often will encounter high speed product line more camera synchronous image processing project, such as for two cameras at the same time the top and bottom surface qr code data assembly line products , image processing at least five times per second, and the product data synchronization in the database, unqualified, eliminate product,
In order to improve the operation efficiency, often using the multithreaded way processing event information (such as image information, database, speaking, reading and writing and a serial port to send), and so on, but in practical application, the collect data does not match the sometimes occasionally happen (determined by way of artificial verification does not match) , how do you ensure that two events (or thread) synchronous execution, and the data match each other?
Cause analysis: possible timing multithreaded or usage problems
Stick the key code:
Note: the two events often trigger at the same time, it is better to use multithreading technology, at the same time for data analysis,








how to better coordinate data synchronization problems in many events, in order to meet the same time the two data that match the requirements? You have good? Thank you for your guidance!

CodePudding user response:

Vote, said two or more threads are not qualified

CodePudding user response:

This has involved philosophical questions

CodePudding user response:

Vote, said two or more threads are not qualified

CodePudding user response:

This problem I looked at the familiar, you checked the, indeed as expected familiar

Ok, in a post on you already reply, you need the thread security context to ensure

Now you have half sentence context information posted? There is no

Mobile phone reply, knock code trouble, please put a post on see, think about why we write a context there

You now a left and a right, and then said the camera left an event, an event to the right, they trigger a really represents is the same thing?

As you say, in the condition of high speed, it is possible to represent different things around,

So the last answer, you need a thread-safe context

CodePudding user response:

Can't bear to see this type of code, and use a Wait block, use and get a bunch of leftxxx rightxxx automatically setting, logic seems to be piled up very long, feeling is art writing code,
  •  Tags:  
  • C#
  • Related