msgraph-sdk-php icon indicating copy to clipboard operation
msgraph-sdk-php copied to clipboard

requests are not asynchronous

Open br4nnigan opened this issue 1 year ago • 2 comments

It seesm the requests aren't really asynchronous as stated in the readme ("The SDK is designed to make async requests by default").

$t = microtime(true);
$r = $graphServiceClient->users()->byUserId($user_id)->get();
print_r($r); // => fullfilled promise, already contains data
var_dump(number_format(microtime(true) - $t, 3)); // about 400ms later

Is this a bug or could this be environment related?

br4nnigan avatar Mar 25 '24 13:03 br4nnigan

I realized when doing mutliple the actual requests seem async, it's just the output that is still in sync for some reason

br4nnigan avatar Mar 25 '24 13:03 br4nnigan

Yeah, I noticed the same when I tried to download the files asynchronously. I created a ticket in a corresponding repo: https://github.com/microsoft/kiota-php/issues/32

sevka avatar Dec 17 '24 10:12 sevka