mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 12:39:56 +00:00
NETWORKING: Add CurlRequest::wait()
This commit is contained in:
parent
2acb8e2215
commit
bc63abd3e1
@ -148,4 +148,10 @@ NetworkReadStreamResponse CurlRequest::execute() {
|
||||
|
||||
const NetworkReadStream *CurlRequest::getNetworkReadStream() const { return _stream; }
|
||||
|
||||
void CurlRequest::wait(int spinlockDelay) {
|
||||
while (state() == Networking::PROCESSING) {
|
||||
g_system->delayMillis(spinlockDelay);
|
||||
}
|
||||
}
|
||||
|
||||
} // End of namespace Networking
|
||||
|
@ -93,6 +93,9 @@ public:
|
||||
|
||||
/** Returns Request's NetworkReadStream. */
|
||||
const NetworkReadStream *getNetworkReadStream() const;
|
||||
|
||||
/** Waits for Request to be processed. Should be called after Request is put into ConnMan. */
|
||||
void wait(int spinlockDelay = 5);
|
||||
};
|
||||
|
||||
} // End of namespace Networking
|
||||
|
Loading…
Reference in New Issue
Block a user