diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2016-11-16 22:10:42 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2016-11-16 22:10:42 +0900 |
| commit | 9d58ad912a8da9e25725d053598c8f5fdf76e41b (patch) | |
| tree | fa62cd5b248e293154f157deda23927eb5faf02f | |
| parent | e12693c02787c9ec26175909a080f420be4ca85b (diff) | |
Document that libaria2 is not thread safe
| -rw-r--r-- | doc/manual-src/en/libaria2.rst | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/doc/manual-src/en/libaria2.rst b/doc/manual-src/en/libaria2.rst index 4b701294..c39cfa0d 100644 --- a/doc/manual-src/en/libaria2.rst +++ b/doc/manual-src/en/libaria2.rst @@ -54,12 +54,14 @@ And create aria2 session object:: :type:`Session` ``session`` is an aria2 session object. You need this object through out the download process. Please keep in mind that only one :type:`Session` object can be allowed per process due to the heavy -use of static objects in aria2 code base. :type:`SessionConfig` -``config`` holds configuration for the session object. The constructor -initializes it with the default values. In this setup, -:member:`SessionConfig::keepRunning` is ``false`` which means -:func:`run()` returns when all downloads are processed, just like -aria2c utility without RPC enabled. And +use of static objects in aria2 code base. :type:`Session` object is +not safe for concurrent accesses from multiple threads. It must be +used from one thread at a time. In general, libaria2 is not entirely +thread-safe. :type:`SessionConfig` ``config`` holds configuration for +the session object. The constructor initializes it with the default +values. In this setup, :member:`SessionConfig::keepRunning` is +``false`` which means :func:`run()` returns when all downloads are +processed, just like aria2c utility without RPC enabled. And :member:`SessionConfig::useSignalHandler` is ``true``, which means libaria2 will setup signal handlers and catches certain signals to halt download process gracefully. We also setup event handler callback |
