Synchronization of event parameters

The value of the asynchronous event has synchronization problems

The essence of event parameters is that it is time for process scheduling to refresh, and the progress itself may be out of sync, so parameters avoid showing out of sync! ! !

1 ) The order of execution

1-2-3 >U1 , U2-U3 , and possibly        1 -U1-2-3 , U2-U3 can't be controlled in the end. Therefore, the different uses of this parameter isolation is also the main reason for multiple copies of event parameters.

Including android, winphone, Ios is the case!

 

2 ) The essence of progress event parameters:

     WorkEvent(Source)

     WorkProgressEvent(Source,State,Index,Total)

     WorkExcepionEvent(Source,Exception)

    Because of the value of the external event, the interface needs to be refreshed, and the value of the memory and the object will not be locked, resulting in inconsistent values. , this value is constantly changing, resulting in inconsistency, so it is similar and not the same object, remember! ! ! !

    Mainly because of different uses.

 

3 ) If it is merged into a WorkSource parameter, make sure that this progress parameter will not be used, changed or occupied next time!

WorkSource{

    State(Get)---> This if used multiple times, please use other markers, current marker and progress marker! ! ! !

    Index,Total,

    Exception

}


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325482031&siteId=291194637