Skip to content

Commit

Permalink
v2.0 - api updates (#15)
Browse files Browse the repository at this point in the history
* Adding pipe operator

* API simplified with reduced overload set for deferred tasks. We no longer need to pass allocators when submitting tasks but instead bind a allocator type to the pool itself.

* Removed non portable includes

* Fixed calls to comparitors for windows

* API updated renaming task_pool.h to simply pool.h

* Adding noexcept where suitable

* Adding future api to task_pool

* Fixed bug not incrementing the wait list

* Improving coverage

* removed old header

* tewaking test for msvc in ci

* Trait fixes for msvc
  • Loading branch information
benny-edlund authored Jan 28, 2023
1 parent e01586d commit 74f0f09
Show file tree
Hide file tree
Showing 12 changed files with 2,781 additions and 3,638 deletions.
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# v2.0
Refined version reducing overload set by binding allocator to the pool itself and adding pipe operator and future api for function composition

- [x] Remove allocator variants of task_pool::submit in favour of templating the task bool so that we do not need to pass allocators all the time.
- [x] Change external API wait_for_tasks to wait()
- [x] Pools should be future-like
- [x] Dropping support for callables with templated call operators
- [x] Reduced overload set of `submit` and `make_deferred_task`
- [x] Allow pipeline tasks to take allocators and stop_tokens
- [x] Changed `task_pool.h` to simply `pool.h`
- [x] API is now const and noexcept correct ( to the best of my mortal abilities )
# v1.0
Initial version supporting full set of features

- [x] Allow tasks from function pointers, free and member
- [x] Allow cancelling tasks after started by passing token type
- [x] Allow using custom allocators to allocate future states
- [x] Allow using custom allocators to allocate tasks storage
- [x] Allow using custom allocators inside tasks perform allocations
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ dynamic_project_options(
--suppress=passedByValue
--suppress=syntaxError
--suppress=constParameter # buggy
--suppress=nullPointer # buggy
--suppress=constStatement # doesnt like pipes
--suppress=throwInNoexceptFunction # does not know about new(std::nothrow)
--inconclusive
)

Expand Down
Loading

0 comments on commit 74f0f09

Please sign in to comment.