asp.net - How were WebAPI requests cancelled in the olden days before async/await? -


in .net 4.5, using async/await pattern, web request can cancelled including cancellationtoken in async controller method. of course can passed async entity framework methods, , whole thing can cancelled nicely.

but going 6 years, before days of async, how webapi or mvc controller methods cancelled? possible? , if so, possible cancel long-running entity framework queries within cancelled requests?

my motivation asking i've run experiments , found in cases, synchronous versions of large-ish ef queries faster async counterparts. async versions vary between 10 , 50% longer. furthermore, application internal use , realistically ever serve maximum of 3 concurrent users, scalability non-issue.

in short, want speed of old-fashioned, synchronous entity framework methods (and therefore, synchronous controller methods), cancellability.

but going 6 years, before days of async, how webapi or mvc controller methods cancelled? possible? , if so, possible cancel long-running entity framework queries within cancelled requests?

legacy asp.net uses thread.abort cancel synchronous requests. of course causes application instability, asp.net regularly recycle app domain (and service process).

i'm not sure if legacy asp.net uses thread.abort cancel asynchronous requests (while running code, mean). assume so, don't know sure.

as final note, please notify ef team of performance issues.


Comments

Popular posts from this blog

How to understand 2 main() functions after using uftrace to profile the C++ program? -

c# - Update a combobox from a presenter (MVP) -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -