Commit graph

11 commits

Author SHA1 Message Date
Stephen Seo 292bffb636 Impl nested threaded calls
More testing is probably required to make sure it works properly.
2022-06-15 21:15:34 +09:00
Stephen Seo 3286aa5a74 WIP nestable threads via ThreadPool
Currently has a race-condition-like memory corruption bug where function
contexts are deleted before child-functions complete (probably).
2022-06-15 16:38:36 +09:00
Stephen Seo f27c22675a Add easyWakeAndWait() to ThreadPool
Changed usage of ThreadPool in EC::Manager to use easyWakeAndWait().
2021-09-09 15:53:55 +09:00
Stephen Seo 222fbb0862 Make ThreadPool::getThreadCount() constexpr 2021-09-07 20:24:47 +09:00
Stephen Seo 5c72ecb74b Add ThreadPool::getThreadCount()
Without the previously removed THREADCOUNT constant, there was no way to
query the ThreadCount from outside the class. This function provides
this.
2021-09-07 20:18:41 +09:00
Stephen Seo beb3eae6e2 Remove "THREADCOUNT" from ThreadPool
Redundant because "SIZE" provides the same value.
2021-09-07 20:15:53 +09:00
Stephen Seo 183eab10b3 Update documentation 2021-09-07 12:04:42 +09:00
Stephen Seo 6a8902ad51 Allow ThreadPool to be created with < 2 ThreadCount 2021-09-07 11:46:38 +09:00
Stephen Seo 16f410c8ef Add isQueueEmpty() to ThreadPool 2021-09-07 11:29:06 +09:00
Stephen Seo 0f2a98b886 Usage of ThreadPool fixes 2021-09-06 20:57:13 +09:00
Stephen Seo 2e9e18a964 Impl ThreadPool 2021-09-06 15:54:24 +09:00