C
C
crescent2020-11-06 15:40:02
C++ / C#
crescent, 2020-11-06 15:40:02

C# hangs for more than two requests?

There are a couple of methods:

method1(String s){
Task.Factory.StartNew(() => Web.LongRequest(s));
}


method2(String s){
Task.Factory.StartNew(() => Web.FastRequest(s));
}


///вызываю
method1("1");
method2("2");

//второй приходит раньше первого - все ОК

///вызываю
method1("1");
method1("11");
method2("2");

второй зависает и тупо ждет


How to solve this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2020-11-06
@tentrun

Respose at you asynchronous?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question