Changes between Version 10 and Version 12 of Ticket #5874


Ignore:
Timestamp:
Feb 24, 2023, 6:56:05 PM (15 months ago)
Author:
phosit
Comment:

Rewrite the ticket. Task manager wasn't mentioned and i described the problem some tasks have wich are not jet converted. I also added a link two new diffs.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #5874

    • Property Milestone Alpha 27Work In Progress
  • Ticket #5874 – Description

    v10 v12  
    1 We currently use std::thread in a number of places:
     1There are issues with our implementation: we use "naked" std::thread instead of cleverer solutions.
     2This, notably, means we fail to detect exceptions happening in the threads (see https://code.wildfiregames.com/rP22649#45341 )
    23
    3 - net client (net session) Phab:D3877
    4 - net server
    5 - user reporter Phab:D4426
    6 - sound
    7 - texture converter Phab:D4425
    8 - more?
     4[25656] implements a task manager. Now not every task wich is run concurently does need to create it's own std::thread.
    95
     6Phab:D4956 does implement exception handling for tasks in the task manager.
    107
    11 Currently uses the threadpool
     8These tasks use the task manager:
    129- map generator
    1310- pathfinder
    1411
    15 There are issues with our implementation: we use "naked" std::thread instead of cleverer solutions.
    16 This, notably, means we fail to detect exceptions happening in the threads (see https://code.wildfiregames.com/rP22649#45341 )
    17 A better architecture ought to be found and implemented.
     12These tasks should be adapted to use the task manager:
     13- user reporter Phab:D4426
     14- texture converter Phab:D4425
     15
     16A task in the task manager should never 'wait' (for a condition_variable; for a mutex; for some time...) that would put the whole thread to sleep. Instead it would be better to run another task in the meantime and resume the original task later. Phab:D3877 or Phab:D4097 does extend the task manager to make that possible. These tasks rely on such a feature:
     17- net client (net session) Phab:D3877
     18- net server
     19- sound