How to control timeout DownloadOperation::StartAsync ?
-
Thursday, April 05, 2012 11:41 PM
Hi,
How i can control timeout of download operation?
BackgroundDownloader^ bd = ref new BackgroundDownloader( ); DownloadOperation^ loader_op = bd->CreateDownload( address, file ); task< DownloadOperation^ > downloadTask( loader_op->StartAsync( ) ); downloadTask.then( [ = ]( DownloadOperation^ op ) { ... } );
I don't see the way to pass cancellation_token to that API.
All Replies
-
Friday, April 06, 2012 7:05 AMYou can add a cancellation taken in the constructor, and keep watch the timeout on this taken.
NEU_ShieldEdge
-
Wednesday, April 11, 2012 9:36 AM
hi
you can use
WaitForSingleObjectEx(smi_event_wait,1000,false);
it can sleep 1 second- Proposed As Answer by Jesse JiangMicrosoft Contingent Staff, Moderator Tuesday, April 17, 2012 7:35 AM
- Marked As Answer by Jesse JiangMicrosoft Contingent Staff, Moderator Monday, May 07, 2012 2:54 AM


