aboutsummaryrefslogtreecommitdiff
path: root/src/script/cpp_api/s_async.cpp
AgeCommit message (Collapse)Author
2022-05-02Async environment for mods to do concurrent tasks (#11131)sfan5
2021-08-28Async-related script cleanupssfan5
2021-01-22Remove dead code (#10845)rubenwardy
2018-01-04[CSM] Don't load the IO library. (#6087)red-001
* [CSM] Don't load the IO library. * Rename the function to match the Lua API function name and add a missing `const` * Add a comment to explain some strange code and fix the other issues pointed out by shadowninja.
2017-08-20Modernize source code: last part (#6285)Loïc Blot
* Modernize source code: last par * Use empty when needed * Use emplace_back instead of push_back when needed * For range-based loops * Initializers fixes * constructors, destructors default * c++ C stl includes
2017-06-19C++11 cleanup on constructors (#6000)Vincent Glize
* C++11 cleanup on constructors dir script
2017-05-06Use a settings object for the main settingsShadowNinja
This unifies the settings APIs. This also unifies the sync and async registration APIs, since the async registration API did not support adding non-functions to the API table.
2017-04-25Fix various points reported by cppcheck (#5656)Loïc Blot
* Fix various performance issues reported by cppcheck + code style (CI) * Make CI happy with code style on master * guiFileSelectMenu: remove useless includes * some performance fixes pointed by cppcheck * remove some useless casts * TextDest: remove unused setFormSpec function * Fix various iterator post-increment reported by cppcheck
2017-04-20Fix various copy instead of const ref reported by cppcheck (part 3) (#5616)Loïc Blot
* Also remove 2 non declared but defined functions * Make some functions around const ref changes const
2016-10-06use unordered containers where possible (patch 4 on X)Loic Blot
Also remove some unused parameters/functions
2015-10-31Fix server crashing on Lua errorsShadowNinja
Previously, the server called FATAL_ERROR when a Lua error occured. This caused a (mostly useless) core dump. The server now simply throws an exception, which is caught and printed before exiting with a non-zero return value. This also fixes a number of instances where errors were logged multiple times.
2015-10-26Remove some abort() callsest31
abort() doesn't benefit from the high level abstractions from FATAL_ERROR.
2015-08-27Push error handler afresh each time lua_pcall is usedKahrl
Fixes "double fault" / "error in error handling" messages (issue #1423) and instead shows a complete backtrace.
2015-08-23Clean up threadingShadowNinja
* Rename everything. * Strip J prefix. * Change UpperCamelCase functions to lowerCamelCase. * Remove global (!) semaphore count mutex on OSX. * Remove semaphore count getter (unused, unsafe, depended on internal API functions on Windows, and used a hack on OSX). * Add `Atomic<type>`. * Make `Thread` handle thread names. * Add support for C++11 multi-threading. * Combine pthread and win32 sources. * Remove `ThreadStarted` (unused, unneeded). * Move some includes from the headers to the sources. * Move all of `Event` into its header (allows inlining with no new includes). * Make `Event` use `Semaphore` (except on Windows). * Move some porting functions into `Thread`. * Integrate logging with `Thread`. * Add threading test.
2015-08-10Display Lua memory usage at the time of Out-of-Memory errorkwolekr
Also misc. minor cleanups
2015-08-05Improve Script CPP API diagnosticskwolekr
2015-03-07For usages of assert() that are meant to persist in Release builds (when ↵Craig Robbins
NDEBUG is defined), replace those usages with persistent alternatives
2015-01-13Performance fixes.onkrot
2014-05-30Fix over-poping and only push the core onceShadowNinja
2014-05-08Use "core" namespace internallyShadowNinja
2014-05-07Organize builtin into subdirectoriesShadowNinja
2014-04-27Fix code style of async APIShadowNinja
2014-04-27Remove dependency on marshal and many other async changesShadowNinja
This makes a number of changes: * Remove the dependency on marshal by using string.dump and loadstring. * Use lua_tolstring rather than having Lua functions pass string lengths to C++. * Move lua_api/l_async_events.* to cpp_api/s_async.*, where it belongs. * Make AsyncWorkerThread a child of ScriptApiBase, this removes some duplicate functionality. * Don't wait for async threads to shut down. (Is this safe? Might result in corruption if the thread is writing to a file.) * Pop more unused items from the stack * Code style fixes * Other misc changes