Andrey Prygunkov
d6e8f67927
#622 , #135 , ff69fbbeb9: fixed trimming of relative paths in config
2019-04-07 15:56:31 +02:00
Andrey Prygunkov
e07a6b9443
#351 : sleep longer in frontend when console window is hidden
...
(only in Windows app)
2019-02-09 09:45:38 +01:00
Andrey Prygunkov
bdc7ba38db
#351 : sleep longer in disk service
...
If there are no active downloads the disk service can now sleep for 10
seconds instead of 1.
2019-01-26 18:17:36 +01:00
Andrey Prygunkov
89427f42ce
#351 : "WorkState" is now observable
2019-01-26 18:16:17 +01:00
Andrey Prygunkov
adf3e05e1d
#351 : refactor: utility function "Sleep"
...
to replace direct calls to “usleep”, with parameter in milliseconds
instead of microseconds.
2019-01-22 22:23:40 +01:00
Andrey Prygunkov
e3bd94189a
#351 : refactor: moved changeable state into new Unit "WorkState.cpp"
...
from Unit “Options.cpp”. The latter now contains only program options
(which cannot be changed without reload).
2019-01-22 21:57:00 +01:00
Andrey Prygunkov
57f4d2864b
#351 : refactor: use same name for cond var and mutex
2019-01-21 23:40:12 +01:00
Andrey Prygunkov
05c841880f
#593 : 794f240f48: fixed potential lock up
...
due to race condition
2019-01-21 21:39:58 +01:00
Andrey Prygunkov
92828acab0
#351 : reworked timed services
...
Now sleeping much longer, up to next scheduled work, instead of often
wake ups to check if the work needs to be performed. This improves CPU
usage in idle.
2019-01-21 21:21:16 +01:00
Andrey Prygunkov
59cae49344
#604 : fixed LGTM alerts for C++
2019-01-19 11:55:25 +01:00
Andrey Prygunkov
a5f2c1c7c5
#597 : 49e8fea0e2: use std::thread instead of platform implementation
2019-01-07 19:02:18 +01:00
Andrey Prygunkov
c2b93c588b
#597 : use std::mutex and std::condition_variable on all platforms
...
wrapped them in custom classes for easier replacements, just in case.
2019-01-07 18:52:19 +01:00
Andrey Prygunkov
3934244a70
#597 : use std::mutex and std::condition_variable on Windows
...
That’s the easiest way to get compatibility with Windows XP yet better
performance on Windows Vista and above.
2019-01-06 21:42:41 +01:00
Andrey Prygunkov
43c9bb78f3
#597 : use ConditionVar instead of std:condition_variable
2019-01-06 13:14:56 +01:00
Andrey Prygunkov
32a6bf18ad
#597 : reverted changes to Thread-unit
...
Due to compatibility issues on older platforms (issues discovered on
ARMv7 with GCC 5.2 but may not be limited to this platform) the usage
of C++11 thread- and synchronisation facilities has been reverted to
previous custom OS-specific implementation.
2019-01-06 12:50:28 +01:00
Andrey Prygunkov
2cb419691d
#593 : 794f240f48: fixed compiling error
...
in GCC 5 for armel. Promise/future are not supported there and were
replaced with condition_variable.
2019-01-04 19:38:46 +01:00
Andrey Prygunkov
a74722d8cc
#590 : 20036b73b8: fixed compiling error
...
when cross-compiling: PRId64 and others maybe undefined even if
<inttypes.h> exists
2019-01-03 23:17:20 +01:00
Federico Cuello
85995ad56f
Pause FeedCoordination::Run thread for 1 sec using condition variables
...
Loop every second waiting on a condition variable to reduce the number
of CPU wake ups and keep responsiveness.
2019-01-03 12:30:34 +01:00
Federico Cuello
1f3067c1e3
Pause PrePostProcessor::Run thread using condition variables
...
Wait until new jobs or a Stop signal instead of looping, in a way that
doesn't reduce responsiveness.
2019-01-03 12:29:56 +01:00
Federico Cuello
794f240f48
Pause DoMainLoop until stop/reload signal in daemon mode
...
When in deamon mode, just wait for the Stop signal instead of looping
constantly, in a way that doesn't affect responsiveness.
2019-01-03 12:27:28 +01:00
Federico Cuello
49e8fea0e2
Use std::thread instead of platform implementation
...
Simplify thread handling by using std::thread.
2019-01-03 12:27:28 +01:00
Federico Cuello
fa8f8855f9
Use std::atomic for Thread class members
...
Before only m_threadCount was protected by a mutex but not the rest of
the bools that are read/written from different threads. This replaces
them by atomic values removing the need for the mutex and protecting the
previously unprotected bools, except for m_autoDestroy that it's only
set before starting the thread.
2019-01-03 12:27:26 +01:00
Federico Cuello
fb3a27fde9
Replace m_threadMutex by static Mutex
...
Just use Mutex and remove the need to call Thread::Init()
2019-01-02 20:49:09 +01:00
Federico Cuello
b29131ffb8
Use std::mutex instead of custom class Mutex
...
Basically this is just removing the custom class and using a typedef to
keep the name. Most of the changes are just case for the lock/unlock
methods.
2019-01-02 20:46:48 +01:00
Federico Cuello
541a695e2f
fix compile warning: -Wsign-compare
...
Fix sign compare warning by improving casting choices.
2018-12-21 16:04:41 +01:00
Federico Cuello
34d157990d
fix compile warning: -Wnonnull
...
Rewrite the intentional segafult to avoid the compile warning.
2018-12-21 15:07:43 +01:00
Federico Cuello
1f89c037b9
fix compile warning: -Wunused-variable
...
Don't define variables only used for debuggin when debug is not enabled.
2018-12-21 15:01:00 +01:00
Federico Cuello
20036b73b8
fix compile warning: -Wformat
...
Use macros defined in inttypes.h for the proper format for 64 bit types
and fall-back to previously define format when inttypes.h is not
available.
2018-12-21 14:56:55 +01:00
Andrey Prygunkov
0916c2a908
#561 : more deterministic cleanup of OpenSSL
...
to prevent crash when using OpenSSL-FIPS
2018-06-28 18:10:06 +02:00
Andrey Prygunkov
1264878a97
#538 : added compatibility with Android Bionic C library
2018-06-13 21:03:34 +02:00
Andrey Prygunkov
a4252a1e79
#549 : force terminating remote processors
...
when terminating remote server to ensure all child threads are
terminated on reload/shutdown, even if connections were not closed as
expected
2018-06-01 23:38:10 +02:00
bket
5893d03f1b
#497 : added LibreSSL support
2018-01-20 18:17:38 +01:00
Andrey Prygunkov
a901deff03
#463 : stop static initialisation invasion
2017-10-31 11:30:54 +01:00
Andrey Prygunkov
7deb3c1b68
#461 : renamed option "LogBufferSize" to "LogBuffer"
...
and removed obsolete options “SaveQueue” and “ReloadQueue” from
config-file
2017-10-29 13:07:00 +01:00
Andrey Prygunkov
d4886ac7d1
#461 : removed option "BrokenLog"
2017-10-29 12:51:49 +01:00
Andrey Prygunkov
5b3372107d
#461 : removed option "AccurateRate"
2017-10-29 12:43:06 +01:00
Andrey Prygunkov
07c54740a7
#461 : removed option "TerminateTimeout"
...
No thread killing anymore. Hanging downloads are gracefully cancelled
after timeout set in “ArticleTimeout” or “UrlTimeout”.
2017-10-29 12:34:16 +01:00
Andrey Prygunkov
af111adbde
#461 : removed options "SaveQueue" and "ReloadQueue"
2017-10-28 16:17:45 +02:00
Andrey Prygunkov
ff671e722d
#455 : changed default location of log-file
2017-10-23 23:29:40 +02:00
Andrey Prygunkov
15c292653e
#458 : compiling without libxml2 to test dev environment
...
new configure-parameter “--disable-libxml2”.
2017-10-22 23:52:13 +02:00
Andrey Prygunkov
3c2575bc26
#454 : removed option "RateBuffer"
...
since it’s no longer needed with raw decoder which works on 4KB buffer
already
2017-10-20 20:54:52 +02:00
Andrey Prygunkov
c59ab2d9dc
#454 : one-pass simd decoder
...
updated SIMD decoder, support for end-of-stream detection
2017-10-19 18:27:04 +02:00
Andrey Prygunkov
a31fb733a2
#454 : SIMD CRC routines for Intel and ARM
2017-10-12 21:09:24 +02:00
Andrey Prygunkov
69a0db63f6
#454 : integrated node-yencode library by Anime Tosho
...
1) integrated the library; 2) splitted units by CPU architecture; 3)
extended makefile and configure script to detect CPU architecture and
use appropriate compiler flags; 4) runtime CPU features detection for
x86 and ARM with dynamic code dispatching; 5) temporary (for test
purposes) printing info about SIMD support to stdout on program
startup; 6) new SIMD routines are not yet used in the program
2017-10-08 20:49:13 +02:00
Andrey Prygunkov
f5aa27979c
#448 , 186da63056: small speed optimisation in NServ
2017-10-09 13:35:10 +02:00
Andrey Prygunkov
54eb8e1291
#448 : new option "SkipWrite"
...
replaces compiler define “SKIP_ARTICLE_WRITING”. 2) renamed option
“Decode” to “RawArticle”. 3) option “CrcCheck” moved from section
“Download Queue “ into section “Check and Repair”
2017-09-28 17:31:47 +02:00
Andrey Prygunkov
262df77f74
#449 : new option "RateBuffer"
...
to configure speed meter update rate
2017-09-22 23:45:26 +02:00
Andrey Prygunkov
71505340d0
#448 : disable article writing and decoding
...
Disabling is now possible for test purposes via defines
SKIP_ARTICLE_WRITING and SKIP_ARTICLE_DECODING (nzbget.h)
2017-09-22 20:25:05 +02:00
Andrey Prygunkov
d90a40909b
#446 : faster CRC computation
2017-09-21 18:06:17 +02:00
Andrey Prygunkov
80b8ee8dfb
#440 : automatic update check
...
New option "UpdateCheck”.
2017-09-05 20:31:11 +02:00