c# - Does WebApi's async context trickle down to libraries using TaskParallel? -


i have .net library uses parallelqueryable , parallel.foreach internally parallelize calculations.

now, library being consumed webapi application. know webapi uses async context prevent concurrent access current request. question is, webapi's use of context affect library's internal parallel computations in way (for example continuations have performed on "gui" thread?)?

it wouldn't make sense if tpl behaved way describe. whole point of plinq , parallel.foreach() execute code in parallel. , using synchronization context (in asp.net or gui application) execute these tasks mean wouldn't execute in parallel. because of that, plinq, parallel.foreach() , task.run() don't use synchronization context.


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -