arvidn
8c8c3d5587
replace boost::function with std::function
2016-08-13 07:07:26 -04:00
Alden Torres
e55a310e79
use of BOOST_FALLTHROUGH, typos and minor cleanup
2016-08-01 11:42:18 -04:00
Arvid Norberg
7bf49c0a1c
modernize hasher to use array_view ( #931 )
...
modernize hasher to use array_view as well as adding array_view support to entry
2016-07-22 07:29:39 -07:00
Arvid Norberg
eaea4a81cc
modernize: remove redundant smart ptr get(), use fixed-width integer types ( #900 )
2016-07-10 07:31:58 -04:00
Arvid Norberg
770935cd46
modernize-use-nullptr ( #894 )
2016-07-09 16:26:26 -04:00
Alden Torres
40c343be93
fixed macro assert around assert_torrent_refcount ( #868 )
2016-06-28 13:42:18 -04:00
Arvid Norberg
a675682b6c
some cleanup of TORRENT_DEBUG defines ( #863 )
...
some cleanup of TORRENT_DEBUG defines
2016-06-27 22:28:51 -04:00
Arvid Norberg
31b2a03005
some optimizations ( #858 )
...
allow disk I/O callback objects to be moved into disk io jobs
2016-06-27 01:02:00 -04:00
Arvid Norberg
6aabe3762b
general modernization ( #836 )
...
general modernization. use nullptr instead of NULL, use std::tuple instead of boost::tuple, transition some unordered set/map from boost to std. some clean-up of includes
2016-06-20 11:32:06 -04:00
Steven Siloti
f1585d8317
Fix abort_jobs being called multiple times ( #831 )
...
disk_io_thread::abort_jobs must only be called once, but it was possible for
concurrent calls to be made from abort() and thread_fun() if the max threads
had been set to zero but there were still disk I/O threads running.
m_num_running_threads doesn't need to be atomic anymore
2016-06-18 16:53:23 -04:00
Arvid Norberg
ed077c8358
use cstdint intead of boost/cstdint.hpp ( #833 )
...
use cstdint intead of boost/cstdint.hpp
2016-06-18 14:01:38 -04:00
Arvid Norberg
4d927f4029
modernize disk_buffer_holder to be move-only ( #824 )
...
modernize disk_buffer_holder to be move-only
2016-06-16 08:24:41 -04:00
Steven Siloti
2fed4103f8
scalable thread pool ( #770 )
2016-06-15 20:49:28 -04:00
Arvid Norberg
ef1a24518d
fix dht tests ( #803 )
...
fix tests
2016-06-11 15:37:28 -04:00
Arvid Norberg
223f24ca27
some cleanup and transition to std::unique_ptr ( #786 )
...
some cleanup and transition to std::unique_ptr
2016-06-05 14:07:24 -04:00
Arvid Norberg
96999ad67f
replace uses of boost::bind with std::bind and lambdas ( #745 )
2016-05-25 00:31:52 -04:00
Arvid Norberg
e8380e1d0b
factor out includes from config.hpp into the files actually using it. primarily, printf family of functions, since C++11 version is used now. This removes the need for an snprintf-wrapper on windows ( #732 )
2016-05-17 09:24:06 -04:00
Arvid Norberg
44a668db62
build with gcc/mingw on appveyor ( #722 )
...
enable gcc/mingw builds on appveyor. Some mingw tests crash currently, they need debugging and are currently disabled.
2016-05-15 13:28:22 -04:00
Arvid Norberg
c91a700c07
Msvc warnings ( #685 )
...
fix msvc warnings and build examples with warnings-as-errors
2016-05-02 12:36:21 -04:00
Arvid Norberg
20b41ad0b9
Threads ( #671 )
...
use std::thread, std::mutex, std::condition_variable instead of pulling them in from boost.asio internals.
2016-04-30 18:54:23 -04:00
Andrei Kurushin
62eb956c54
fix x64 build with VS2015 UP2 compiler ( #640 )
...
fix VS2015 compiler warnings for: address-model=64, deprecated-functions=on, link=shared
2016-04-25 17:22:09 -04:00
Arvid Norberg
c9c6dd2d3b
clean up the annotations used for asio debugging ( #639 )
...
clean up the annotations used for asio debugging (tracking outstanding async operations)
2016-04-23 17:29:25 -04:00
Andrei Kurushin
7b5d48c02a
fix default release build with VS2015 UP2 compiler warnings ( #624 )
...
* fix default release build with VS2015 UP2 compiler warnings
this will allow to successfully build:
bjam toolset=msvc-14.0 release deprecated-functions=off character-set=unicode link=static warnings-as-errors=on
2016-04-17 16:56:07 -04:00
arvidn
b16f43132b
Merge branch 'RC_1_1'
2016-03-20 20:39:49 -04:00
arvidn
0095aa084f
make coalesce reads and coalesce writes actually work
2016-03-20 16:34:19 -04:00
arvidn
96e2693d13
merge RC_1_1 into master
2016-03-19 16:02:46 -04:00
arvidn
f7c9062019
deprecate more parts of explicit cache as well as fixing typos of TORRENT_NO_DEPRECATE preprocessor tests
2016-03-19 07:54:29 -04:00
arvidn
77ce318a84
merged RC_1_1 into master
2016-03-17 00:46:05 -04:00
arvidn
317eb2fe2a
remove unused disk allocation code
2016-03-16 20:13:28 -04:00
arvidn
f79a9c7adf
merged RC_1_1 into master
2016-03-16 19:59:53 -04:00
Arvid Norberg
a1d60db706
Merge pull request #547 from arvidn/no-read-cache-1.1
...
fix use_read_cache=false
2016-03-16 08:14:15 -04:00
arvidn
4926081960
fix use_read_cache=false
2016-03-16 02:22:18 -04:00
arvidn
08bac479be
allow each peer have at least 2 allocated disk blocks at any given time, to avoid stalling when cache_size setting is small. also deprecate use_write_cache
2016-03-16 00:28:11 -04:00
Steven Siloti
4331f57021
restrict check_cache_level to only runing on one thread at a time
...
If another thread trys to call check_cache_level then m_cache_check_state is set
to indicate that the thread currently in check_cache_level needs to call it again.
2016-03-14 19:03:12 -07:00
Steven Siloti
d405535a3f
try to free the piece after kicking the hasher and flushing
2016-03-14 19:03:12 -07:00
Steven Siloti
e8f93df700
fix indentation
2016-03-14 19:03:12 -07:00
Steven Siloti
826bbe35ee
always cache writes
2016-03-14 19:03:12 -07:00
Steven Siloti
6e8db41dd2
check_cache_level after performing a job rather than before
...
If dirty blocks are added while the job is running there is a chance of
deadlock if the dirty blocks cause the cache to exceed its size limit and
no further jobs come in to trigger another check.
2016-03-14 19:03:12 -07:00
Steven Siloti
9c5bb25d65
always clear outstanding_flush after attempting to flush a cached write
...
Also clear outstanding_flush before calling kick_hasher because kick_hasher
may unlock the cache mutex which can allow more dirty blocks to be added
which may require another flush_hashed job be added.
2016-03-14 19:03:12 -07:00
arvidn
921cbeebed
add option to delete just the partfile when removing a torrent
2016-03-14 08:26:39 -04:00
arvidn
0d0048d415
try to evict a volatile piece before allocating a new one for a hash check. It may be faster to check files without growing the cache, or reusing the same buffers.
2016-03-13 12:52:44 -04:00
arvidn
6d85c7c5f0
merge RC_1_1 into master
2016-03-08 01:10:48 -05:00
arvidn
67774d660d
always keep at least 2 async hash jobs outstanding when rechecking torrents (to keep the bandwidth delay product full)
2016-03-06 16:31:18 -05:00
arvidn
a02c1d2164
record cache settings in the job instead of checking it twice for more robust behavior
2016-03-06 16:15:13 -05:00
arvidn
8ca76f9d59
fix support for auto disk cache size and disk buffer pool allocator behavior
2016-03-06 16:14:55 -05:00
arvidn
2bd6ad9974
remove invalid assert in the disk thread
2016-03-04 20:20:49 -05:00
arvidn
8135ea326f
rename async_check_fastresume to async_check_files, and make it take an add_torrent_params object instead of bencoded resume data
2016-02-20 02:00:07 -05:00
arvidn
ae7058e119
remove the timestamps and file sizes from the resume data. This makes saving resume data alot cheaper, since it doesn't have to go via the disk thread. It also removes an old-standing API usage issue where there was easily a race condition introduced between saving resume data and pausing a torrent.
2016-02-06 15:50:55 -05:00
arvidn
1f9f588e75
merge copyright year update and changelog from RC_1_0
2016-01-17 18:57:46 -05:00
arvidn
4cc2e879c4
comment out verbose pex logging. fix bug in disabled_storage and an error reporting issue on short reads in default_storage
2016-01-10 11:50:56 -05:00
arvidn
2acb3dcb24
clean up use of getrlimit() by wrapping it and move it to platform_util.cpp. Also take the opportunity to make it simulator friendly (consistent in simulation)
2015-12-02 00:45:34 -05:00
arvidn
b628692223
separate out announce_entry and torrent_status into their own headers
2015-09-18 08:08:08 -04:00
arvidn
17c5759829
disable warning for unused command line argument and fix warnings. remove redundant travis build config. use new preprocessor on clang to avoid warnings
2015-09-06 22:55:41 -04:00
arvidn
904da120d7
fixed some warnings
2015-08-20 22:28:00 +02:00
arvidn
8cf8e65861
turn linked_list into a template to improve type safety and remove some casts
2015-08-20 02:02:46 +02:00
arvidn
ffa870d280
fixed some GCC warnings
2015-08-20 01:33:20 +02:00
arvidn
bd177a857f
make tailequeue a template, introduce type safety, remove old-style casts
2015-08-19 15:22:05 +02:00
arvidn
5c8fc818c1
fix more warnings
2015-08-19 01:39:01 +02:00
arvidn
12da02ae52
fix some warnings
2015-08-18 09:33:00 -04:00
arvidn
8d8c049d9e
fix warnings and invalid defines in disk_io_thread.cpp
2015-08-18 07:55:50 -04:00
arvidn
9a0092c120
fix some warnings
2015-08-16 12:17:23 -04:00
Alden Torres
cd8a4d2511
Moved TORRENT_DISK_STATS to default_storage with the option of enable/disable at runtime.
2015-08-03 18:16:43 -04:00
arvidn
e0c3d28321
fix some warnings
2015-08-02 15:55:05 -04:00
arvidn
2b05b1c85c
fix cppcheck warnings
2015-07-11 10:36:13 -04:00
arvidn
f91799006a
fix make_shared invocation
2015-06-14 16:42:52 -04:00
arvidn
5cb095f6d2
support using 0 disk threads (to perform disk I/O in network thread)
2015-06-14 16:00:04 -04:00
arvidn
389ffc622c
don't pull in the asio namespace in libtorrent. refer to it by boost::asio
2015-06-06 01:24:25 -04:00
Arvid Norberg
d43f7b56a2
update copyright year
2015-06-03 05:18:48 +00:00
Arvid Norberg
9b0313bd8e
hold settings_pack by shared_ptr when passing it across thread boundaries. don't allocate it on the heap redundantly
2015-05-29 05:27:53 +00:00
Arvid Norberg
607e708bc4
fix warnings
2015-05-19 03:13:49 +00:00
Arvid Norberg
051ca6b22c
fix warnings
2015-05-18 05:32:18 +00:00
Arvid Norberg
58ae099cf8
clean up disk_io_job a bit to avoid old-style casts
2015-05-16 20:41:37 +00:00
Arvid Norberg
8fdacf9534
address coverity issues and build issue with non atomic 64 bit operations
2015-05-03 22:21:19 +00:00
Arvid Norberg
a1dbba7cf4
make clear_read_cache() code less confusing
2015-04-29 05:11:55 +00:00
Arvid Norberg
2fff222235
silence some warnings on msvc
2015-04-27 02:21:12 +00:00
Arvid Norberg
f5629eb403
cleanup and fixing of more warnings
2015-04-21 00:23:00 +00:00
Arvid Norberg
4d15f1410f
fix warnings, some clean-up and todo comments
2015-04-20 04:52:49 +00:00
Arvid Norberg
013ed36f09
landed alert_queue feature branch into trunk
2015-04-03 20:15:48 +00:00
Arvid Norberg
ccc7e45406
landed mutable torrents branch in trunk
2015-03-21 00:12:40 +00:00
Arvid Norberg
37225b71ae
const static -> static const (thanks gubatron). helps swigs parser
2015-03-14 00:42:27 +00:00
Arvid Norberg
6c1df7eb55
landed the bdecode branch in master. lazy_bdecode/lazy_entry is now being replaced by bdecode/bdecode_node
2015-03-12 05:20:12 +00:00
Arvid Norberg
c1dc982f4f
deprecate the ptime type and related time types. just use boost::chrono / std::chrono
2015-03-12 04:34:54 +00:00
Arvid Norberg
89055c4c7a
some more optimizations on loading torrents
2015-02-18 03:32:49 +00:00
Arvid Norberg
bc9281a27c
deprecate file_entry (used by file_storage) and clean up the add_file overload that borrows memory (and improve implementation and documentation). The python bindings were updated to more closely match the c++ API (specifically actually using file_storage)
2015-01-21 15:46:12 +00:00
Arvid Norberg
a1c1f9393d
fix flush_pieces in disk_io_thread to also flush the read cache
2015-01-01 10:10:13 +00:00
Arvid Norberg
1039d4ae86
tweak some TODO comments and fix one
2014-12-31 14:41:35 +00:00
Arvid Norberg
5666cdcd07
fix warnings
2014-12-09 09:33:34 +00:00
Arvid Norberg
1ed1963f29
remove size_type typedef in favor of boost::int64_t
2014-12-03 04:32:50 +00:00
Arvid Norberg
0b711f1280
remove unused variables. add some comments
2014-11-17 03:10:00 +00:00
Arvid Norberg
935eea9d0b
some more fixes to cache_status
2014-10-25 21:28:57 +00:00
Arvid Norberg
83394f54f9
transition fenced job histogram to session stats gauges. deprecate it from cache_status
2014-10-25 20:59:54 +00:00
Arvid Norberg
0bcbe433ed
deprecate most of cache_status type (use session stats instead)
2014-10-25 20:07:50 +00:00
Arvid Norberg
d287ce9c46
fix issue when hash checking files resulting in a short read
2014-10-12 23:49:51 +00:00
Arvid Norberg
f32f5e96aa
deprecate parts of cache_status and move those counters to session_stats counters. make the performance counters thread safe. fix some issues recently introduced to performance counters and the usage of them in client_test
2014-08-01 06:07:48 +00:00
Arvid Norberg
671ae32ae5
fix docs generation for stats counters
2014-07-30 02:00:14 +00:00
Arvid Norberg
035da93592
fixed disk_io_job flags being used as file flags
2014-07-28 01:06:00 +00:00
Arvid Norberg
cd456964ad
storage fixes
2014-07-20 08:59:02 +00:00
Arvid Norberg
f3a7008bd5
close files when stopping a torrent
2014-07-20 00:23:12 +00:00
Arvid Norberg
c8e8eb6e15
some asserts in disk_io_thread. fix issue in torrent::initialize
2014-07-12 19:23:31 +00:00
Arvid Norberg
7351389ce8
land libtorrent_aio branch in trunk
2014-07-06 19:18:00 +00:00