基于长时间运行的进程同步到异步api转换 [英] synchronous to asynchronous api conversion based on long running process

查看:82
本文介绍了基于长时间运行的进程同步到异步api转换的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请建议在asp.net应用程序api中实现同步到异步行为的方法。



我正在尝试编写一个基本上是同步的api内部调用webrequest其他API如果达到阈值我应该将其转换为异步并在等待背景的实际结果时回复。



感谢inadvance

解决方案

请阅读:

将同步程序转换为异步程序 [ ^ ]



-KR

please suggest a way forward to acheive synchronous to asynchronous behaviour in an asp.net application api.

I am trying to write an api which is basically a synchronous call internally to webrequest other api if it reaches a threshold i should convert it to asynchronous and respond back while waiting for the actual result at background.

thanks inadvance

解决方案

Please read this:
Converting A Synchronous Program Into An Asynchronous Program[^]

-KR


这篇关于基于长时间运行的进程同步到异步api转换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆