pytq-cxx 1.1.0__tar.gz → 1.1.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (24) hide show
  1. {pytq_cxx-1.1.0/pytq_cxx.egg-info → pytq_cxx-1.1.1}/PKG-INFO +3 -3
  2. {pytq_cxx-1.1.0 → pytq_cxx-1.1.1}/README_pytq.md +2 -2
  3. {pytq_cxx-1.1.0 → pytq_cxx-1.1.1}/_yatq/include/yatq/internal/promise_utils.h +28 -6
  4. {pytq_cxx-1.1.0 → pytq_cxx-1.1.1}/_yatq/include/yatq/thread_pool.h +2 -0
  5. {pytq_cxx-1.1.0 → pytq_cxx-1.1.1}/_yatq/include/yatq/timer_queue.h +2 -0
  6. {pytq_cxx-1.1.0 → pytq_cxx-1.1.1}/_yatq/include/yatq/version.h +1 -1
  7. {pytq_cxx-1.1.0 → pytq_cxx-1.1.1}/pyproject.toml +1 -1
  8. {pytq_cxx-1.1.0 → pytq_cxx-1.1.1}/pytq/pythonize.py +4 -2
  9. {pytq_cxx-1.1.0 → pytq_cxx-1.1.1/pytq_cxx.egg-info}/PKG-INFO +3 -3
  10. {pytq_cxx-1.1.0 → pytq_cxx-1.1.1}/MANIFEST.in +0 -0
  11. {pytq_cxx-1.1.0 → pytq_cxx-1.1.1}/_yatq/bind.cpp +0 -0
  12. {pytq_cxx-1.1.0 → pytq_cxx-1.1.1}/_yatq/include/yatq/internal/concepts.h +0 -0
  13. {pytq_cxx-1.1.0 → pytq_cxx-1.1.1}/_yatq/include/yatq/internal/log4cxx_proxy.h +0 -0
  14. {pytq_cxx-1.1.0 → pytq_cxx-1.1.1}/_yatq/include/yatq/utils/logging_utils.h +0 -0
  15. {pytq_cxx-1.1.0 → pytq_cxx-1.1.1}/_yatq/include/yatq/utils/sched_utils.h +0 -0
  16. {pytq_cxx-1.1.0 → pytq_cxx-1.1.1}/_yatq/traits.h +0 -0
  17. {pytq_cxx-1.1.0 → pytq_cxx-1.1.1}/pytq/__init__.py +0 -0
  18. {pytq_cxx-1.1.0 → pytq_cxx-1.1.1}/pytq_cxx.egg-info/SOURCES.txt +0 -0
  19. {pytq_cxx-1.1.0 → pytq_cxx-1.1.1}/pytq_cxx.egg-info/dependency_links.txt +0 -0
  20. {pytq_cxx-1.1.0 → pytq_cxx-1.1.1}/pytq_cxx.egg-info/top_level.txt +0 -0
  21. {pytq_cxx-1.1.0 → pytq_cxx-1.1.1}/setup.cfg +0 -0
  22. {pytq_cxx-1.1.0 → pytq_cxx-1.1.1}/setup.py +0 -0
  23. {pytq_cxx-1.1.0 → pytq_cxx-1.1.1}/setup_helpers/find_dep_headers.cmake +0 -0
  24. {pytq_cxx-1.1.0 → pytq_cxx-1.1.1}/setup_helpers/find_dep_libs.cmake +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pytq-cxx
3
- Version: 1.1.0
3
+ Version: 1.1.1
4
4
  Summary: single-threaded timer demultiplexer backed by C++ implementation
5
5
  Author-email: Nikita Vaganov <nikita.e.vaganov@gmail.com>
6
6
  Project-URL: Homepage, https://github.com/vaganov/yatq
@@ -21,6 +21,6 @@ see [yatq homepage](https://github.com/vaganov/yatq)
21
21
  from pytq import ThreadPool, TimerQueue, pythonize
22
22
 
23
23
  **NB:** On _macOS_ one may need to specify **MACOSX_DEPLOYMENT_TARGET** environment variable on install. Do not set
24
- higher than the current _macOS_ version. Minimal supported version is **13.3**
24
+ higher than the current _macOS_ version. Minimal supported version is **13.4**
25
25
 
26
- (venv) $ MACOSX_DEPLOYMENT_TARGET=13.3 pip install pytq-cxx
26
+ (venv) $ MACOSX_DEPLOYMENT_TARGET=13.4 pip install pytq-cxx
@@ -9,6 +9,6 @@ see [yatq homepage](https://github.com/vaganov/yatq)
9
9
  from pytq import ThreadPool, TimerQueue, pythonize
10
10
 
11
11
  **NB:** On _macOS_ one may need to specify **MACOSX_DEPLOYMENT_TARGET** environment variable on install. Do not set
12
- higher than the current _macOS_ version. Minimal supported version is **13.3**
12
+ higher than the current _macOS_ version. Minimal supported version is **13.4**
13
13
 
14
- (venv) $ MACOSX_DEPLOYMENT_TARGET=13.3 pip install pytq-cxx
14
+ (venv) $ MACOSX_DEPLOYMENT_TARGET=13.4 pip install pytq-cxx
@@ -3,28 +3,50 @@
3
3
 
4
4
  #include <type_traits>
5
5
 
6
+ #include <boost/exception_ptr.hpp>
7
+
6
8
  namespace yatq::internal {
7
9
 
8
10
  template<typename result_type, typename Job, typename Promise>
9
11
  std::enable_if_t<!std::is_void_v<result_type>> run_and_set_value(Job job, Promise promise) {
10
- promise.set_value(job());
12
+ try {
13
+ promise.set_value(job());
14
+ }
15
+ catch (...) {
16
+ promise.set_exception(boost::current_exception());
17
+ }
11
18
  }
12
19
 
13
20
  template<typename result_type, typename Job, typename Promise>
14
21
  std::enable_if_t<std::is_void_v<result_type>> run_and_set_value(Job job, Promise promise) {
15
- job();
16
- promise.set_value();
22
+ try {
23
+ job();
24
+ promise.set_value();
25
+ }
26
+ catch (...) {
27
+ promise.set_exception(boost::current_exception());
28
+ }
17
29
  }
18
30
 
19
31
  template<typename result_type, typename Future, typename Promise>
20
32
  std::enable_if_t<!std::is_void_v<result_type>> get_and_set_value(Future future, Promise promise) {
21
- promise.set_value(future.get());
33
+ try {
34
+ promise.set_value(future.get());
35
+ }
36
+ catch (...) {
37
+ promise.set_exception(boost::current_exception());
38
+ }
22
39
  }
23
40
 
24
41
  template<typename result_type, typename Future, typename Promise>
25
42
  std::enable_if_t<std::is_void_v<result_type>> get_and_set_value(Future future, Promise promise) {
26
- future.get();
27
- promise.set_value();
43
+ try {
44
+ future.get();
45
+ promise.set_value();
46
+ }
47
+ catch (...) {
48
+ promise.set_exception(boost::current_exception());
49
+ }
28
50
  }
29
51
 
30
52
  }
@@ -17,7 +17,9 @@
17
17
  #endif
18
18
 
19
19
  #include "yatq/internal/concepts.h"
20
+ #ifndef YATQ_DISABLE_FUTURES
20
21
  #include "yatq/internal/promise_utils.h"
22
+ #endif
21
23
  #include "yatq/internal/log4cxx_proxy.h"
22
24
 
23
25
  namespace yatq {
@@ -17,7 +17,9 @@
17
17
  #endif
18
18
 
19
19
  #include "yatq/internal/concepts.h"
20
+ #ifndef YATQ_DISABLE_FUTURES
20
21
  #include "yatq/internal/promise_utils.h"
22
+ #endif
21
23
  #include "yatq/internal/log4cxx_proxy.h"
22
24
  #include "yatq/utils/logging_utils.h"
23
25
  #ifndef YATQ_DISABLE_PTHREAD
@@ -1,6 +1,6 @@
1
1
  #ifndef _YATQ_VERSION_H
2
2
  #define _YATQ_VERSION_H
3
3
 
4
- #define YATQ_VERSION "1.1.0"
4
+ #define YATQ_VERSION "1.1.1"
5
5
 
6
6
  #endif
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "pytq-cxx"
7
- version = "1.1.0"
7
+ version = "1.1.1"
8
8
  authors = [{name="Nikita Vaganov", email="nikita.e.vaganov@gmail.com"}]
9
9
  description = "single-threaded timer demultiplexer backed by C++ implementation"
10
10
  readme = "README_pytq.md"
@@ -12,9 +12,11 @@ def pythonize(src: _yatq.boost.future) -> asyncio.Future[Any]:
12
12
 
13
13
  def on_done(future: _yatq.boost.future):
14
14
  try:
15
- chained.get_loop().call_soon_threadsafe(chained.set_result, future.get())
15
+ result = future.get()
16
16
  except Exception as exc:
17
- chained.set_exception(exc)
17
+ chained.get_loop().call_soon_threadsafe(chained.set_exception, exc)
18
+ else:
19
+ chained.get_loop().call_soon_threadsafe(chained.set_result, result)
18
20
 
19
21
  src.then(func=on_done, policy=_yatq.boost.launch.sync)
20
22
  return chained
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pytq-cxx
3
- Version: 1.1.0
3
+ Version: 1.1.1
4
4
  Summary: single-threaded timer demultiplexer backed by C++ implementation
5
5
  Author-email: Nikita Vaganov <nikita.e.vaganov@gmail.com>
6
6
  Project-URL: Homepage, https://github.com/vaganov/yatq
@@ -21,6 +21,6 @@ see [yatq homepage](https://github.com/vaganov/yatq)
21
21
  from pytq import ThreadPool, TimerQueue, pythonize
22
22
 
23
23
  **NB:** On _macOS_ one may need to specify **MACOSX_DEPLOYMENT_TARGET** environment variable on install. Do not set
24
- higher than the current _macOS_ version. Minimal supported version is **13.3**
24
+ higher than the current _macOS_ version. Minimal supported version is **13.4**
25
25
 
26
- (venv) $ MACOSX_DEPLOYMENT_TARGET=13.3 pip install pytq-cxx
26
+ (venv) $ MACOSX_DEPLOYMENT_TARGET=13.4 pip install pytq-cxx
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes