Skip to content

Commit

Permalink
fix: update version number and threadpool.h to modern c++
Browse files Browse the repository at this point in the history
  • Loading branch information
william-silversmith committed Dec 19, 2023
1 parent 239f9c1 commit 585bb61
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
env:
CIBW_ARCHS_LINUX: ${{matrix.arch}}
CIBW_BEFORE_BUILD: pip install oldest-supported-numpy setuptools wheel
CIBW_ARCHS_MACOS: "x86_64 arm64"

- uses: actions/upload-artifact@v2
with:
Expand Down
24 changes: 24 additions & 0 deletions python/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,6 +1,30 @@
CHANGES
=======

2.3.2
-----

* build: update for py312
* docs: describe voxel\_graph parameter
* fix: use cython.binding(True) on headline methods
* fix: use cython.binding(True) on headline methods
* build: add pyproject.toml
* ci: add testing and update wheel builds for py312
* build: str of NumpyImport
* build: update cibuildwheel
* update build
* chore: update supported python versions
* chore: remove appveyor

2.3.1
-----

* release(2.3.1): update build system
* fix: update build for py311
* build: add py311 to tox
* chore: update edt.cpp
* install: delay numpy invocation

2.3.0
-----

Expand Down
2 changes: 1 addition & 1 deletion python/edt.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ from cpython cimport array
cimport numpy as np
import numpy as np

__VERSION__ = '2.3.1'
__VERSION__ = '2.3.2'

ctypedef fused UINT:
uint8_t
Expand Down
7 changes: 4 additions & 3 deletions python/threadpool.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ May 2019
- The license file was moved from a seperate file to the top of this one.
- Created public "join" member function from destructor code.
- Created public "start" member function from constructor code.
- Used std::invoke_result_t to update to modern C++
*/

#ifndef THREAD_POOL_H
Expand All @@ -47,7 +48,7 @@ class ThreadPool {
ThreadPool(size_t);
template<class F, class... Args>
auto enqueue(F&& f, Args&&... args)
-> std::future<typename std::result_of<F(Args...)>::type>;
-> std::future<std::invoke_result_t<F, Args...>>;
void start(size_t);
void join();
~ThreadPool();
Expand Down Expand Up @@ -99,9 +100,9 @@ void ThreadPool::start(size_t threads) {
// add new work item to the pool
template<class F, class... Args>
auto ThreadPool::enqueue(F&& f, Args&&... args)
-> std::future<typename std::result_of<F(Args...)>::type>
-> std::future<std::invoke_result_t<F, Args...>>
{
using return_type = typename std::result_of<F(Args...)>::type;
using return_type = std::invoke_result_t<F, Args...>;

auto task = std::make_shared< std::packaged_task<return_type()> >(
std::bind(std::forward<F>(f), std::forward<Args>(args)...)
Expand Down

0 comments on commit 585bb61

Please sign in to comment.