View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0005169||The Dark Mod||Coding||public||05.03.2020 04:15||15.11.2022 00:24|
|Product Version||TDM 2.08|
|Target Version||TDM 2.12|
|Summary||0005169: Clean multithreading routines|
|Description||The current set of multithreading routines are a mess for many reasons:|
1) A crazy mix of C++11 threads and Sys_XXX threads (the later ones rely on WinAPI/pthreads depending on platform). In some cases it is very hard to clarify how it works, e.g. I don't know whyWaitForSingleObject breaks std::condition_variable waits. Perhaps better to switch to Sys_XXX threads everywhere? Occasional ports from BFG codebase will introduce these functions anyway, so switching to C++11 is hardly possible.
2) Thread an synchronization objects live in weird places. For instance, the old Async threads live in Sys/Posix, while frontend threads live in ordinary engine code. Some functions uses Sys_Mutex (which are object-based and can be created in any number), while others rely on 4 numbered Sys_CriticalSection-s. I had a feeling that with more multithreading it's better to drop critical section API, but not sure here.
3) Thread termination is a problem. Old threads were terminated using pthread_cancel on Linux, new ones are terminated with separate bool flags. Both ways seem ugly. Also quick_exit was added recently.
|Tags||No tags attached.|
|I know that there was a large number of fixes for this, can this tracker be closed or should it be moved to 2.10?|
The described situation has not changed at all.
On the other hand, it would be great to hear Cabalisti's opinion on it.
|Something to clean up, for sure. Just rather low priority (for me), as it does appear to be working fine right now and is not code that I regularly stumble across.|
|Moving to 2.10. Feel free to un-target if there is no further interest to move forward during the 2.10 dev cycle|
|Moving to 2.11 cabalistic will not have time to work on this during the 2.10 cycle|
|Moving to 2.12|
|05.03.2020 04:15||stgatilov||New Issue|
|05.03.2020 04:15||stgatilov||Status||new => assigned|
|05.03.2020 04:15||stgatilov||Assigned To||=> cabalistic|
|21.03.2020 17:43||stgatilov||Target Version||=> TDM 2.09|
|14.12.2020 22:25||nbohr1more||Note Added: 0013136|
|14.12.2020 22:54||nbohr1more||Relationship added||parent of 0005441|
|14.12.2020 23:08||nbohr1more||Relationship added||related to 0004408|
|15.12.2020 02:41||stgatilov||Note Added: 0013137|
|23.12.2020 13:11||cabalistic||Note Added: 0013179|
|23.12.2020 18:56||nbohr1more||Target Version||TDM 2.09 => TDM 2.10|
|23.12.2020 18:57||nbohr1more||Note Added: 0013182|
|04.10.2021 18:19||nbohr1more||Note Added: 0014396|
|04.10.2021 18:19||nbohr1more||Target Version||TDM 2.10 => TDM 2.11|
|15.11.2022 00:24||nbohr1more||Note Added: 0015421|
|15.11.2022 00:24||nbohr1more||Target Version||TDM 2.11 => TDM 2.12|