User Details
- User Since
- Dec 21 2016, 1:38 PM (225 w, 4 d)
Yesterday
Thanks for giving this a look :)
'Release Candidate' update.
Sat, Apr 17
Don't autocancel on destruction.
Some comment clarification.
Make Status an enum class, forgot enums could be implicitly converted to int and that's terrible.
Make Future never-blocking, keep packaged_task blocking. I think that's easier on client code, and seems to be the direction of concurrency TS going forward (we'll see).
I'm moving the dev overlay checkbox to a later diff.
Improve the handling of configdb.
One thing to check -> global scripts are run directly in the 'global namespace', not in a closure, so this might introduce some pollution/noise in the global namespace if local variables were defined by these scripts.
(Can we get a screenshot of the GUI setup? I'd possibly like to make the icon optional (as in hidden behind an option) / make it relatively non-intrusive)
Make sure to triple check serialisation, as this introduces GUI - simulation interaction (though at a glance things look setup correctly)
Fri, Apr 16
Make the max distance configurable.
Comments, remove UnitAI debug before committing.
Should fix the test crash. I had a logic issue indeed.
Unbreak tests, fix cppcheck.
Minor tweaks. Hoping to clear the warning.
I need to double check the test_dbg error on macos, could be a logic issue in the tests.
More tests, some cleanup, better handling of temporary threads.
TBH AttackHelper.js might be better than Attack.js for the helper. It's a little redundant but it avoids ambiguity which is useful.
I'm wondering if it wouldn't be a good idea to have some JS files that cannot be overwritten by modders, and call these from C++ instead of doing workarounds like that.
Thu, Apr 15
Several bug fixes, a few improvements.
Yes, my point is that
Clamp<int>(some_double, some_float, some_size_t) is just as explicit as Clamp(static_cast<int>(some_double), ...) and much more readable.
- Rename CancellableFuture to Future since I don't have a non-cancellable-future type anyways.
- Replace ThreadPoolTask with a generic PackagedTask (std::packaged_task replacement).
- Move it to its own header - not particularly tied to ThreadPool.
- Make it possible to return a value via the future.
- Clean up executor interfaces
- Add a few more tests.
You could make it a namespace & declare classes friend to the original type if that's more convenient, not sure. Not sure it's that useful to make the class a member variable when it's all static methods, but maybe you have some notion that state will be useful in the future
Wed, Apr 14
Should fix the yellow status.
- Add a dev overlay option to disable the thread pool.
- Fix include
- Tweaks.
There's some cleanup in the LongPathfinder, but it's quite related to threading (const-safety of the unused jump-point-cache)
Fix include, turn off debug define, add a config option for easier debugging.
Clean up the implementation. Clean up temporary threads.
Make it possible to get a 'pool-level' executor, using a global queue.
Add some tests.
Should fix the debug mode assert.
Also delete the conversion script.
Fix cheats being reset every time.
Tue, Apr 13
Mon, Apr 12
It's safer, because if one changes things one cannot forgot to call delete somewhere with this version.
Reverted in rP25246.
To reproduce: start Acropolis Bay skirmish map with an AI.
Fixed in rP25245
I think hashable weak_ptr is better but it looks like we won't get that until C++23, so for now I'll go with this.