1. Because there are some Shared resources, part of the business logic, to lock, prevent several other threads change test environment (physical test environment), the test result failed
So request/asks the user whether rework during a break in, must be Shared resources let out the Lock (left), to make several other threads to perform, when users click on continue/redo, and ready to enter the Lock, and these similar behavior many times tend to be nested
2. This multi-threaded tasks, is not necessarily the same time, both before and after the may lag a lot, and some of these steps will change the test environment, so the requirements before you start the business, can wait to join the business, to perform the same steps in continue (to perform the same steps, test environment will become consistent);
3. Because of the consideration of performance, these waiting to join the business execution of a stage, all entered the phase of the business, to be executed unified
I met problems, is probably the, hope bosses, pioneer can give some experience for help, thank you
CodePudding user response:
"Request/during a break in asking the user whether or not redo, must let out a total of resources" - this does not necessarily, sometimes may be required to in situ block- hope bosses give some comments or Suggestions, thank you
CodePudding user response:
Because we don't know your actual demand,So can only talk about control strategy
1. The strategy one: no matter before, let him do naturally before, just a follow-up
2. The strategy 2: stop before, to do,
So we don't actually are not locked, we are using context and survival to control
Netcore above and if you are using now can understand, don't understand it doesn't matter, we use netcore above and what to speak, can you understand what they achieve similar
public class AppContext
{
Private readonly IServiceProvider _provider;
Private IServiceScope _scope;
Public AppContext (IServiceProvider provider)
{
_provider=the provider;
Create a new common object surial ();
}
Public public environment object to create a new object lifetime ()
{
_scope=_provider. CreateScope ();
Return the Session.
}
Public public environment public environment object=& gt; _scope. ServiceProvider. GetService
}
Let's put a code
services. AddSingleton(a);
Services. AddScoped
Is a thread when you said "call to create a new common object survival" approach, he would object to new a public environment,
That subsequent new task will be to perform in accordance with the new context environment,
And old task, if you want to continue to use the old, no need to worry about your old, if you want to let him use the new so when implementing IServiceScope it time to add a dispose treatment, let him go do some movement before release, such as notice update old task context, such as notification directly over the old task, such as to inform the old task for retracement and according to the new context redo
Scarlet letter logo just strategy, we don't do detailed discussion, because he is your more project characteristics and specific selection strategy, these are not technologyCodePudding user response:
Ps: unlike blog park the great god, their core refers to the core asp.net
And our core refers to the general application framework, Microsoft now the obvious difference with previous language level framework, he is really a universal framework of application level ( like you here - system context and application level of the application of life cycle control, obviously these are application architecture level, instead of the traditional grammatical function level things ), including the great god said recently net6, maui, but you can clearly get the information, "maui" is a typical application in the general things came out of the framework ofCodePudding user response:
2. The multi-threaded tasks, is not necessarily the same time, both before and after the may lag a lot, and some of these steps will change the test environment, so the requirements before you start the business, can wait to join the business, to perform the same steps in continue (to perform the same steps, test environment will become consistent)
Front we talked some control under the new architecture, and then on to talk about you old design, this stuff is traditionally called "thread synchronization", also is to make some threads waiting for a specific event is completed, this is not a lock, this is synchronous signal control (a lot of people like to put this kind of thread, but in fact he is IO operations, rather than the thread operation, which is waiting for an IO to complete the action, rather than waiting for a thread to perform an action)CodePudding user response:
Thank you for your answer , thank you. Thank you bosses
1. The strategy one: no matter before, let him do naturally before, just a follow-up
2. The strategy 2: stop before, to do,
Strategy one, because of Shared resources is hardware, the hardware set up a test environment, and the test environment, with the propulsion, business changes, such as temperature (room temperature to minus a few hundred degrees Celsius), the volume, the position of some hardware and other conditions; But sometimes these to join the business process with the previous process is needed to deal with a same step (without a plus, but don't have to deal with, this is done to time efficiency, because the test time is very long, generally may be dozens of hours), so the business process, whether plus before and after, must want to consider and deal with
The idea of strategy 2: now is this appearance,
Member let start the business process waits for midway gasser behind; Have an infinite loop, continuously polling of those business processes (and associated hardware sharing resources), let business ahead of the execution, until all the threads at the same process, and then processing
When faced with pause/or redo abnormal, jump out of the child business, after waiting outside the lock the user response
Don't know whether it is feasible that bosses to help give some opinions
Note: the software is PC; WinformCodePudding user response:
You give us a specific application scenario colloquial expression (don't use what thread, lock such representation)
Is the tie points "test case" "story card" something like that, we are combined with the story of you and use cases to discuss, now this term words expressing it's hard to know whether you trapped in there