Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ cpmaddpackage(
cpmaddpackage("gh:fmtlib/fmt#11.2.0")
cpmaddpackage("gh:odygrd/[email protected]")
cpmaddpackage(URI "gh:skypjack/[email protected]" NAME "EnTT" FIND_PACKAGE_ARGUMENTS "CONFIG")
cpmaddpackage(URI "gh:NVIDIA/stdexec#daf12bcc46438f88b3c78212363f7b6531338780" NAME "stdexec" VERSION 0.11 FIND_PACKAGE_ARGUMENTS "CONFIG" OPTIONS "STDEXEC_BUILD_TESTS OFF" "STDEXEC_BUILD_EXAMPLES OFF" "STDEXEC_ENABLE_ASIO ON"
cpmaddpackage(URI "gh:NVIDIA/stdexec#138e136fa4b93e7e096a4968eaac1b0c94f0d255" NAME "stdexec" VERSION 0.11 FIND_PACKAGE_ARGUMENTS "CONFIG" OPTIONS "STDEXEC_BUILD_TESTS OFF" "STDEXEC_BUILD_EXAMPLES OFF" "STDEXEC_ENABLE_ASIO ON" "CMAKE_SKIP_INSTALL_RULES ${CMAKE_SKIP_INSTALL_RULES}"
)
cpmaddpackage(URI "gh:Tradias/[email protected]" FIND_PACKAGE_ARGUMENTS "CONFIG" VERSION 3.4.0)
cpmaddpackage(URI "gh:nlohmann/[email protected]" FIND_PACKAGE_ARGUMENTS "CONFIG" NAME "nlohmann_json")
Expand Down
6 changes: 3 additions & 3 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@
"debug-build"
],
"cacheVariables": {
"QUITE_INSTALL": false,
"BUILD_TESTING": true,
"CMAKE_SKIP_INSTALL_RULES": true,
"SANITIZE_ADDRESS": false,
"SANITIZE_UNDEFINED": false
}
Expand Down Expand Up @@ -96,13 +96,13 @@
"common"
],
"cacheVariables": {
"QUITE_INSTALL": false,
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
"BUILD_TESTING": true,
"CMAKE_C_COMPILER": "gcc-13",
"CMAKE_CXX_COMPILER": "g++-13",
"CMAKE_C_COMPILER_LAUNCHER": "ccache",
"CMAKE_CXX_COMPILER_LAUNCHER": "ccache",
"CMAKE_SKIP_INSTALL_RULES": true
"CMAKE_CXX_COMPILER_LAUNCHER": "ccache"
},
"environment": {
"WAYLAND_DISPLAY": "wl-test-env"
Expand Down
18 changes: 10 additions & 8 deletions libs/probeqt/impl/qtstdexec.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ class QThreadOperationState;
class QThreadScheduler
{
public:
using scheduler_concept = stdexec::scheduler_t;

explicit QThreadScheduler(QThread *thread)
: thread_(thread)
{}
Expand All @@ -34,7 +36,7 @@ class QThreadScheduler
{
QThread *thread;
template <typename CPO>
auto query(stdexec::get_completion_scheduler_t<CPO>) const noexcept
auto query(stdexec::get_completion_scheduler_t<CPO>) const noexcept -> QThreadScheduler
{
return QThreadScheduler{thread};
}
Expand All @@ -53,7 +55,7 @@ class QThreadScheduler
class QThreadSender
{
public:
using is_sender = void;
using sender_concept = stdexec::sender_t;
using completion_signatures =
stdexec::completion_signatures<stdexec::set_value_t(), stdexec::set_error_t(std::exception_ptr)>;

Expand All @@ -66,15 +68,15 @@ class QThreadScheduler
return thread_;
}

DefaultEnv query(stdexec::get_env_t) const noexcept
auto get_env() const noexcept -> DefaultEnv
{
return {thread_};
}

template <class Recv>
QThreadOperationState<Recv> connect(Recv &&receiver)
template <class Receiver>
QThreadOperationState<Receiver> connect(Receiver receiver)
{
return QThreadOperationState<Recv>(std::forward<Recv>(receiver), thread());
return QThreadOperationState<Receiver>(std::move(receiver), thread());
}

private:
Expand Down Expand Up @@ -137,13 +139,13 @@ class QObjectSender
}
};

DefaultEnv query([[maybe_unused]] stdexec::get_env_t env) noexcept
auto get_env() const noexcept -> DefaultEnv
{
return {obj_->thread()};
}

public:
using is_sender = void;
using sender_concept = stdexec::sender_t;
using completion_signatures = stdexec::completion_signatures<stdexec::set_value_t(Args...),
stdexec::set_error_t(std::exception_ptr),
stdexec::set_stopped_t()>;
Expand Down
Loading