diff options
author | truebrain <truebrain@openttd.org> | 2008-06-08 12:06:27 +0000 |
---|---|---|
committer | truebrain <truebrain@openttd.org> | 2008-06-08 12:06:27 +0000 |
commit | b95042b05cf7a8117309edc158df252f6f4adacb (patch) | |
tree | 824116881f6d5514cdaa069f10eddac84da3b04a /src/saveload.cpp | |
parent | 96d7f87cc99ee04791b9fa097a027a17bb82226b (diff) | |
download | openttd-b95042b05cf7a8117309edc158df252f6f4adacb.tar.xz |
(svn r13412) -Add: OTTDThreadTerminateFunc, for all thread systems, which is called when a thread is terminated. Now GenWorld- and SaveLoad-thread cleanup theirselves correctly, while Fibers don't (as that causes access-violations)
Diffstat (limited to 'src/saveload.cpp')
-rw-r--r-- | src/saveload.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/saveload.cpp b/src/saveload.cpp index b6c72d482..585070cd1 100644 --- a/src/saveload.cpp +++ b/src/saveload.cpp @@ -1695,7 +1695,7 @@ SaveOrLoadResult SaveOrLoad(const char *filename, int mode, Subdirectory sb) SaveFileStart(); if (_network_server || - (_save_thread = ThreadObject::New(&SaveFileToDiskThread, NULL)) == NULL) { + (_save_thread = ThreadObject::New(&SaveFileToDiskThread, NULL, &ThreadObject::TerminateCleanup)) == NULL) { if (!_network_server) DEBUG(sl, 1, "Cannot create savegame thread, reverting to single-threaded mode..."); SaveOrLoadResult result = SaveFileToDisk(false); |