dfhack/library/include
Pauli f6b0ac7819 Refactor CoreSuspender to fix Console::lineedit exit hangs
The old CoreSuspender requires processing from Core::Update to allow
commands execute. But that causes issues if Core::Shutdown wants
quarentee cleanup order with std:🧵:join. Fixing shutdown ordering
adds too many branches to already fairly complex code.

I decided to try to refactor CoreSuspender to use simpler locking
locking using a std::recusive_muted as primary synchronization
primitive.
To help control when Core::Update unlocks the primary mutex there is
std::contition_variable_any and std::atomic<size_t> queue lenght
counter.
The last state variable is std::atomic<std:🧵:id> that is used to
keep track of owner thread for Core::IsSuspended query.

This should be merged only just after a release to make sure that it
gets maximum testing in develop branch before next release.

Fixes #1066
2018-06-22 17:57:37 +03:00
..
df Initial 0.44.06 support, update xml 2018-03-10 16:18:15 -05:00
modules Update jobs when committing MapCache changes 2018-06-18 16:34:09 +03:00
.gitignore Add git commit information to libdfhack-version 2015-06-24 19:32:45 -04:00
BitArray.h get rid of "private" comment in BitArray.h 2016-01-21 16:49:16 -05:00
ColorText.h Add parameter type checks to printf style functions 2018-06-11 19:27:35 +03:00
Console.h hide/show: Provide feedback on unsupported platforms 2015-02-08 09:30:40 -05:00
Core.h Refactor CoreSuspender to fix Console::lineedit exit hangs 2018-06-22 17:57:37 +03:00
DFHack.h ditch the unused Vegetation module 2012-12-06 23:47:25 +01:00
DFHackVersion.h Add ABI version symbol to plugins 2018-03-10 16:55:00 -05:00
DataDefs.h Add some includes in DataDefs.h 2018-04-19 21:11:43 -04:00
DataFuncs.h update DataFuncs to support vmethods with 12-13 parameters (#1192) 2017-12-02 21:41:44 -06:00
DataIdentity.h Cast size_t to int explicitly to avoid compiler warning C4267 2016-10-15 10:31:38 +05:30
Error.h Add function names to NullPointer and InvalidArgument exceptions 2018-05-11 09:49:27 -04:00
Export.h Add parameter type checks to printf style functions 2018-06-11 19:27:35 +03:00
Hooks.h Fix ncurses wgetch() on OS X 2017-06-08 13:05:31 -04:00
Internal.h Update license, add contributors file, bump release number 2012-09-30 04:03:37 +02:00
LuaTools.h Refactor CoreSuspender to fix Console::lineedit exit hangs 2018-06-22 17:57:37 +03:00
LuaWrapper.h Avoid DataStaticsFields dependency on PluginManager.h 2015-08-11 22:59:19 -04:00
MemAccess.h Fix some more warnings (GCC 4.8) 2016-07-28 11:00:52 -04:00
Memory.h Update default base address on 64-bit Linux 2016-08-18 17:28:18 -04:00
MiscUtils.h Add parameter type checks to printf style functions 2018-06-11 19:27:35 +03:00
Module.h Update license, add contributors file, bump release number 2012-09-30 04:03:37 +02:00
ModuleFactory.h ditch the unused Vegetation module 2012-12-06 23:47:25 +01:00
PluginManager.h Add ABI version symbol to plugins 2018-03-10 16:55:00 -05:00
Pragma.h Fix a bunch of 64-bit Windows warnings 2017-07-21 13:30:05 -05:00
RemoteClient.h Increased the message size limit in RemoteClient from 8mb to 64mb. 2016-06-20 13:17:30 +05:30
RemoteServer.h Change tabs to spaces to satisfy travis. 2017-10-04 09:48:12 +05:30
RemoteTools.h Refactor CoreSuspender to fix Console::lineedit exit hangs 2018-06-22 17:57:37 +03:00
SDL_events.h Re-add fake SDL headers, get rid of real SDL use. 2012-06-14 02:15:43 +02:00
SDL_keyboard.h Re-add fake SDL headers, get rid of real SDL use. 2012-06-14 02:15:43 +02:00
SDL_keysym.h Fix whitespace issues 2015-02-14 22:53:06 -05:00
TileTypes.h Fix whitespace issues 2015-02-14 22:53:06 -05:00
Types.h Add Filesystem::listdir() 2015-01-28 19:15:58 -05:00
VTableInterpose.h Document better how to access fields of the interposed class. 2014-06-10 13:10:10 +04:00
VersionInfo.h Fix rebase_delta type mismatch 2016-09-28 20:43:02 -04:00
VersionInfoFactory.h Initial 64-bit support 2016-07-03 23:32:43 -04:00
wdirent.h Fix whitespace issues 2015-02-14 22:53:06 -05:00