KnpLabs/php-github-api

Correct Async usage

dkarlovi opened this issue · 0 comments

Reading #561 it seems using the SDK async should be possible in some way, but it's not exactly clear how.

I have a usecase where I fetch the repo listing and need to fetch additional information for each repo since it's not available in the listing.

@Nyholm in #561 you mention wrapping calls to the client instead of making the HTTP client do async, but in that case the calls to the SDK are blocking themselves, invalidating the idea IIUC.

So what would be the correct way to fetch run requests concurrently? I'm aware I'll need to change my usage, would this mean I create an adapter which converts sync calls to async and then I unwrap the promises in my code? Any hints would be very much appreciated.