The functions URL::readEntireBinaryStream() and URL::readEntireTextStream() look handy but block the calling thread. Is it the intention that these are generally called from a worker thread to avoid holding up the UI?
If the answer to the above is yes, I'm a bit confused why the Mac version of these functions uses a worker thread (in URLConnectionState) only to have the calling thread spin waiting for its completion.
Shouldn't it be:
- URL::read..() is blocking -> app may call it on worker thread to make it async -> no need for extra worker thread in URLConnectionState
OR
- URL::read..() is async -> app may spin for completion to make it blocking -> extra worker thread needed in URLConnectionState
Currently it seems to be the worst of both worlds. Now the disclaimer : my knowledge of networky stuff is poor!