joemarshall commented on code in PR #35672:
URL: https://github.com/apache/arrow/pull/35672#discussion_r1220894872
##########
cpp/src/arrow/util/thread_pool.cc:
##########
@@ -532,6 +695,65 @@ int ThreadPool::DefaultCapacity() {
return capacity;
}
+#else // ARROW_ENABLE_THREADING
+ThreadPool::ThreadPool() {
Review Comment:
@kou I was going to do that initially, but the problem is that there is so
much code that assumes that there is an IO pool and a cpu threadpool and that
they are different things that it was easier just to keep track of them. And
even code that uses serialexecutors assumes that other things will run
concurrently because of the i/o pools. I found that rather than refactoring all
code that uses thread pools, it was easier to make the threadpool &
serialexecutors do some basic cooperative multitasking instead. This way also
has an advantage in that it should be possible to incrementally patch in
asynchronous features where the non-threading OS supports them, e.g. in
emscripten it might use async calls to javascript for some types of i/o.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]