Home > Net >  For pause/continue to control the business logic, stop, an exception occurs suggest redo/ignore (not
For pause/continue to control the business logic, stop, an exception occurs suggest redo/ignore (not

Time:03-26

Ps: this post has already sent once, but may post is too long distance to the second page, worried that bosses (wanghui0380) can't see, so to refax. Thank you

Business processes: A special long, the process time and at the same time or possible midway began A process A new
Hardware is only one: and all parts of the hardware is different manufacturer, only the most basic function, can't deal with business, all business to a PC to control N hardware

As this process is A (one or more and midway may add A process. A, or the way to stop A process A),
Process by multiple child within A business, with the execution of multiple child business, hardware environment changes (such as the change of the temperature/pressure/chemical), made after joining process cannot be executed directly, to the environment into the right environment to continue processing (if it's the same's business and environment is the same),
At the same time, the hardware resources can only be in use by a child business at the same time,
But for the sake of time performance and other reasons (such as some conditions, it is not reversible, or too much stress, overflowing cannot directly to other business), lets "the same N process A child business execution" together. So need to wait for other business execution to the same location, to undertake unity;

Pause and redo tip - these artificial response operation, cannot have possession of hardware resources, to make other process to use A

Basic is the same, I do not know bosses for this kind of circumstance how to deal with,
Isolate the bosses (wanghui0380) what, I don't quite understand, is to do what kind of treatment? Thank you

CodePudding user response:

In fact, you might as well put down your questions, abstracts a logic, study the: thread, asynchronous delegate, jam, critical region, the mutex, thread lock these basic concept, after all, from the point of your description, you may not be easy to describe all the details clearly, reply alone cannot finish the work for you, not to stop by 1 to 2 days of a lot more foundation,

You can the demand of design thinking is such,
1. Create a task class that contains the task execution of logic and running state
2. Start the task is to create a thread at a time, and record the thread
3. The need of synchronization is a multiple threads execute Join, until after completion of all, into the subsequent operations,
4. The thread to maintain within 200
  •  Tags:  
  • C#