From 17d7ec31a5651b64c92dba77bc30a94c2a5a6080 Mon Sep 17 00:00:00 2001 From: trcrsired Date: Sun, 18 Jan 2026 18:09:49 +0800 Subject: [PATCH 1/5] remove threads, the apis are terrible --- include/fast_io_hosted/threads/thread/impl.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/fast_io_hosted/threads/thread/impl.h b/include/fast_io_hosted/threads/thread/impl.h index d55c3c54..4eac0345 100644 --- a/include/fast_io_hosted/threads/thread/impl.h +++ b/include/fast_io_hosted/threads/thread/impl.h @@ -1,5 +1,5 @@ #pragma once - +#if 0 #if (defined(_WIN32) && !defined(__WINE__)) && !defined(__CYGWIN__) #include "win32.h" #ifndef _WIN32_WINDOWS @@ -11,4 +11,5 @@ #include "wasi.h" #elif !defined(__SINGLE_THREAD__) && !defined(__NEWLIB__) && !defined(__MSDOS__) && __has_include() #include "pthread.h" -#endif +#endi +#endiff From ae94fd65b3223192a1fb85678939f29ea049031d Mon Sep 17 00:00:00 2001 From: trcrsired Date: Sun, 18 Jan 2026 18:12:44 +0800 Subject: [PATCH 2/5] commented out entire threading --- include/fast_io_hosted/threads/thread/impl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/fast_io_hosted/threads/thread/impl.h b/include/fast_io_hosted/threads/thread/impl.h index 4eac0345..90c452b8 100644 --- a/include/fast_io_hosted/threads/thread/impl.h +++ b/include/fast_io_hosted/threads/thread/impl.h @@ -11,5 +11,5 @@ #include "wasi.h" #elif !defined(__SINGLE_THREAD__) && !defined(__NEWLIB__) && !defined(__MSDOS__) && __has_include() #include "pthread.h" -#endi -#endiff +#endif +#endif From 1244b488572f5799489a744b6bde74e42956e6ca Mon Sep 17 00:00:00 2001 From: trcrsired Date: Sun, 18 Jan 2026 18:18:46 +0800 Subject: [PATCH 3/5] reverse_view should exist after we add ranges header into the bench --- .../0011.containers/deque/0001.push_back/fast_io_reverse.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/benchmark/0011.containers/deque/0001.push_back/fast_io_reverse.cc b/benchmark/0011.containers/deque/0001.push_back/fast_io_reverse.cc index 8491a869..8b2f91f1 100644 --- a/benchmark/0011.containers/deque/0001.push_back/fast_io_reverse.cc +++ b/benchmark/0011.containers/deque/0001.push_back/fast_io_reverse.cc @@ -1,6 +1,7 @@ #include #include #include +#include int main() { From 66e0c77587d71c46ea97d5d661af285816fd38f7 Mon Sep 17 00:00:00 2001 From: trcrsired Date: Sun, 18 Jan 2026 18:20:01 +0800 Subject: [PATCH 4/5] remove everything with thread since the api is terrible --- examples/0040.thread/thread.cc | 38 ---------------------------------- 1 file changed, 38 deletions(-) delete mode 100644 examples/0040.thread/thread.cc diff --git a/examples/0040.thread/thread.cc b/examples/0040.thread/thread.cc deleted file mode 100644 index 46666902..00000000 --- a/examples/0040.thread/thread.cc +++ /dev/null @@ -1,38 +0,0 @@ -#include -#include - -int main() -{ - auto t = ::fast_io::native_thread{[](int param) -#if __cpp_static_call_operator >= 2020207L - static -#endif - noexcept { - ::fast_io::println("the param is: ", param); -#ifdef _WIN32 -#ifdef _WIN32_WINDOWS - ::fast_io::println("the child thread id is: ", ::fast_io::this_thread::get_id()); -#else - ::fast_io::println("the child thread id is: ", ::fast_io::mnp::pointervw(::fast_io::this_thread::get_id())); -#endif -#else - ::fast_io::println("the child thread id is: ", ::fast_io::this_thread::get_id()); -#endif - // ::fflush(stdout); - ::fast_io::this_thread::sleep_for(::std::chrono::seconds{1}); - }, - 5}; - - t.join(); -#ifdef _WIN32 -#ifdef _WIN32_WINDOWS - ::fast_io::println("the parent thread id is: ", ::fast_io::this_thread::get_id()); -#else - ::fast_io::println("the parent thread id is: ", ::fast_io::mnp::pointervw(::fast_io::this_thread::get_id())); -#endif -#else - ::fast_io::println("the parent thread id is: ", ::fast_io::this_thread::get_id()); -#endif - - -} From 7bbcc47feb69e783ecedadc5cab793d2ace2b890 Mon Sep 17 00:00:00 2001 From: trcrsired Date: Sun, 18 Jan 2026 18:24:07 +0800 Subject: [PATCH 5/5] ::std::size(fruits) should be ::std::ranges::size(fruits) --- .../0013.str_btree_set/str_btree_set.cc | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/0026.container/0013.str_btree_set/str_btree_set.cc b/tests/0026.container/0013.str_btree_set/str_btree_set.cc index 22da8d21..a53167e0 100644 --- a/tests/0026.container/0013.str_btree_set/str_btree_set.cc +++ b/tests/0026.container/0013.str_btree_set/str_btree_set.cc @@ -1,4 +1,4 @@ - +#include #include #include @@ -41,13 +41,13 @@ int main() } ::fast_io::io::print("\nreverse:\n"); -/* -// ::std::ranges::reverse_view does not pass CI - for (auto const &e : ::std::ranges::reverse_view(bset)) -*/ - for(auto i{bset.crbegin()},ed{bset.crend()};i!=ed;++i) + /* + // ::std::ranges::reverse_view does not pass CI + for (auto const &e : ::std::ranges::reverse_view(bset)) + */ + for (auto i{bset.crbegin()}, ed{bset.crend()}; i != ed; ++i) { - auto const& e{*i}; + auto const &e{*i}; ::fast_io::io::println(e); } @@ -76,10 +76,10 @@ int main() ::fast_io::io::println("found: ", *it); } } - for (::std::size_t i{};i!=::std::size(fruits);++i) - { - auto const& e{fruits[i]}; - bset.erase_key(e); + for (::std::size_t i{}; i != ::std::ranges::size(fruits); ++i) + { + auto const &e{fruits[i]}; + bset.erase_key(e); } ::fast_io::io::println("bset.is_empty():", bset.is_empty());