c# - Async methods on Sap .Net Connector 3 -
i'm using sap .net connector 3.0.0.42 in c# .net v4.5 applications. far, can use no problems this:
var destination = rfcdestinationmanager.getdestination(destinationname); var repository = destination.repository; var function = repository.createfunction(functionname); function.invoke(destination); var resulttable = function.gettable(tablename); //this can time consuming
sometimes, there calls time consuming , because io bound operations want make async
, not blocking thread while waiting complete, sap .net connector
doesn't expose async methods (as far know).
i read producing async/await methods , task-based async pattern, use need low level async
methods propagate up, right? instance, changing thread.sleep
task.delay
. but, if there no such methods?
my first thought use task.run
read it's cpu bound operations, , using it'll pick thread , block it, it's not async
. also, if develop asp.net app take thread pool, isn't it?
so, question if it possible wrap sync io bound methods in async
ones? think i'm missing here... thanks!
Comments
Post a Comment