You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would it be possible to make RestPS handle requests asynchronously?
Imagine I have a dummy endpoint script that just does the following:
Start-Sleep-Seconds 30Return"Wake Up"
If this endpoint is triggered, the /endpoint/status endpoint (and all other endpoints) also stop responding until the 30 second sleep is complete.
I'm no powershell expert like you kind folks but I did a little reading.
There is a "HttpListener.GetContextAsync" method but that just let's do do other things until the request context is ready. Apply timeouts, etc. It doesn't run the response generation logic Async.
Maybe, once you have a Context (Start-RestPSListener.ps1:80) you could pass off to a Job that does everything from Start-RestPSListener.ps1:85 to 163 so the loop that starts on Start-RestPSListener.ps1:75 could immediately get ready to "Invoke-GetContext" the next incoming (parallel) request. I dunno. I'm just guessing.
Cheers.
Shaun.
The text was updated successfully, but these errors were encountered:
Hello.
Would it be possible to make RestPS handle requests asynchronously?
Imagine I have a dummy endpoint script that just does the following:
If this endpoint is triggered, the /endpoint/status endpoint (and all other endpoints) also stop responding until the 30 second sleep is complete.
I'm no powershell expert like you kind folks but I did a little reading.
There is a "HttpListener.GetContextAsync" method but that just let's do do other things until the request context is ready. Apply timeouts, etc. It doesn't run the response generation logic Async.
Maybe, once you have a Context (Start-RestPSListener.ps1:80) you could pass off to a Job that does everything from Start-RestPSListener.ps1:85 to 163 so the loop that starts on Start-RestPSListener.ps1:75 could immediately get ready to "Invoke-GetContext" the next incoming (parallel) request. I dunno. I'm just guessing.
Cheers.
Shaun.
The text was updated successfully, but these errors were encountered: