Simple C++ Download class
- From: Andreas Volz <lists brachttal net>
- To: gtkmm-list gnome org
- Subject: Simple C++ Download class
- Date: Thu, 17 Jan 2008 19:52:31 +0100
Hello,
for a special need a wrote a Download class with C++ and the help of
Glibmm thread. It creates a thread, downloads files in the background
and informs the caller after finishing. Optional I've a blocking mode to
wait until it finish in the caller thread.
I wrote a lot of unit tests for the class and all except one pass
(waitOnFinishTest blocks). After searching the problem for some days I'm
sticking a little.
Perhaps I used too much mutexes and conditions and the locking code
could be much simplified.
Download.h
http://pastebin.org/15720
Download.cpp:
http://pastebin.org/15718
DownloadTest.cpp
http://pastebin.org/15721
And here the unit test running log:
http://pastebin.org/15724
Perhaps someone could review my code and see a problem. I would be very
thankful for any hints.
regards
Andreas
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]