Andrei Ignat edited this page Oct 26, 2016 · 2 revisions

Welcome to the AsyncSyncLock wiki!

I have simulated async by making Task.Delay

I have simulated sync by calling Process.Start for the timeout application

I have gathered the results in a ConcurrentDictionary , and , when adding in the same time 2 entries, I have concatenated with !

The results are here(yours may vary, however, the sync always finishes before starting another sync)

starting AsyncTaskargument :0

==>starting syncTaskargument :1

<==ending syncTaskargument :1<==

starting AsyncTaskargument :2

==>starting syncTaskargument :3

ending AsyncTaskargument :0

ending AsyncTaskargument :2

<==ending syncTaskargument :3<==

starting AsyncTaskargument :4

==>starting syncTaskargument :5

<==ending syncTaskargument :5<==!starting AsyncTaskargument :6

==>starting syncTaskargument :7

ending AsyncTaskargument :6

ending AsyncTaskargument :4

<==ending syncTaskargument :7<==!starting AsyncTaskargument :8!==>starting syncTaskargument :9

ending AsyncTaskargument :8

<==ending syncTaskargument :9<==

See that the syncTask is already starting after a previous is finishing. ( e.g. ==>starting syncTaskargument :1 <==ending syncTaskargument :1<== )

But the start and finish of the async is interspersed (ending AsyncTaskargument :0 ending AsyncTaskargument :2 )

For more details , please head to http://msprogrammer.serviciipeweb.ro/

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.