Home » U++ Library support » U++ MT-multithreading and servers » Stop Download
Re: Stop Download [message #27439 is a reply to message #27406] |
Sat, 17 July 2010 23:03 |
mubeta
Messages: 77 Registered: October 2006
|
Member |
|
|
Ok, I found an fast solution:
1) Using an hidden progress that take in account the "tarminate" flag:
class MyHideProgress {
protected:
int total, pos;
volatile Atomic *terminated;
public:
bool SetCanceled(int p, int t) { pos = p; total = t; return (bool)*terminated; }
operator Gate2<int, int>() { return callback(this, &MyHideProgress::SetCanceled); }
typedef MyProgress CLASSNAME;
MyHideProgress(volatile Atomic *t) { terminated = t; }
};
2) In this way the gui program can be closed quickly also with HttpClient working in background thread.
|
|
|
Goto Forum:
Current Time: Sun May 05 15:27:19 CEST 2024
Total time taken to generate the page: 0.02217 seconds
|