Jonathan G Rennison
90550d9642
FlowStatMap: Replace RB-tree with btree-indexed vector
2019-10-01 02:13:33 +01:00
Jonathan G Rennison
e7a916d2ce
Linkgraph: Add asymmetric: equal and nearest demand distribution modes
2019-05-01 20:57:59 +01:00
Jonathan G Rennison
674732cd68
Merge: Codechange: Use null pointer literal instead of the NULL macro
2019-04-11 18:14:13 +01:00
Henry Wilson
7c8e7c6b6e
Codechange: Use null pointer literal instead of the NULL macro
2019-04-10 23:22:20 +02:00
Michael Lutz
05bc2ed7cb
Codechange: Replace custom thread code with C++11 thread objects.
...
We assume a conforming C++11 compiler environment that has a valid <thread>-header.
Failure to run a real thread is handled gracefully.
2019-04-06 11:27:39 +02:00
Henry Wilson
bad2c2154b
Codechange: Replaced SmallVector::Resize() with std::vector::resize()
2019-03-26 20:15:57 +00:00
Jonathan G Rennison
117b56caeb
Linkgraph: Replace a std::list with a std::vector.
2017-02-08 22:08:39 +00:00
Jonathan G Rennison
28211c21fc
Linkgraph: Fix a memory leak when aborting job early.
2017-02-08 02:01:27 +00:00
Jonathan G Rennison
375dbdbfe1
Linkgraph: Allow job threads to be aborted early when clearing schedule.
2016-11-26 00:33:50 +00:00
Jonathan G Rennison
d08d1cbd67
Linkgraph: Avoid attempting to merge/apply job when cleaning schedule.
...
This can cause crashes when switching savegame.
Move job merge/apply out of destructor into separate function.
2016-11-26 00:15:01 +00:00
Jonathan G Rennison
1cede8431f
Linkgraph: Support running multiple jobs per spawned thread.
2016-11-01 23:02:15 +00:00
Jonathan G Rennison
84e61b690a
Linkgraph: Changes to job scheduling algorithm.
...
This is to improve responsiveness of link graph updates, whilst
avoiding being blocked waiting for updates to complete.
Previously, large numbers of cheap jobs resulted in poor responsiveness
as it took a long time for jobs to cycle round.
Add 'linkgraph' debug category.
2016-11-01 23:02:15 +00:00
frosch
31f046bd9b
(svn r27670) -Add: [FS#6471] Assign descriptive names to (GNU pthread) threads. (JGR)
2016-10-30 17:29:33 +00:00
Jonathan G Rennison
b8a89437a1
Enable use of atomic store/load on clang.
2016-09-08 18:40:08 +01:00
Jonathan G Rennison
78cf5ca682
Add setting for linkgraph times to be in non daylength scaled days.
...
Savegame format change for link graph jobs.
Change link graph scheduler to support more than one operation
per day, on _date_fract ticks other than SPAWN_JOIN_TICK.
2016-01-29 00:26:47 +00:00
Jonathan G Rennison
548ea31e83
Fix compilation on gcc before 4.7 due to use of atomic builtins.
2016-01-07 22:45:11 +00:00
Jonathan G Rennison
a3768d3a29
Label threads with a descriptive name where supported (pthreads).
2015-11-26 17:48:47 +00:00
Jonathan G Rennison
c6854afcef
Pause the game instead of blocking when link graph jobs lag.
...
Check if the job is still running one date fract tick before it
is due to join and if so pause the game until its done.
This avoids the main thread being blocked on a thread join.
Show if pause is due to link graph job in status bar, update network
messages.
This does not apply for network clients.
2015-09-03 18:36:30 +01:00
frosch
a14b836bf2
(svn r27178) -Fix [FS#5969]: Data race due to lazy initialisation of objects.
2015-03-07 18:27:01 +00:00
frosch
780e595933
(svn r27178) -Fix [FS#5969]: Data race due to lazy initialisation of objects.
2015-03-07 18:27:01 +00:00
rubidium
2be4215f43
(svn r26482) -Codechange: add an include that allows us to undefine/redefine "unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values
2014-04-23 20:13:33 +00:00
rubidium
0463dbdc9e
(svn r26482) -Codechange: add an include that allows us to undefine/redefine "unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values
2014-04-23 20:13:33 +00:00
fonsinchen
ebcba0c0e3
(svn r26347) -Fix [FS#5898]: Make sure link graph jobs can delete themselves after SLA_NULL.
2014-02-16 18:42:59 +00:00
fonsinchen
cc77d40336
(svn r26347) -Fix [FS#5898]: Make sure link graph jobs can delete themselves after SLA_NULL.
2014-02-16 18:42:59 +00:00
fonsinchen
537975b794
(svn r26341) -Fix [FS#5902]: Reroute cargo when automatic distribution is switched off.
2014-02-16 11:17:17 +00:00
fonsinchen
2945e76269
(svn r26341) -Fix [FS#5902]: Reroute cargo when automatic distribution is switched off.
2014-02-16 11:17:17 +00:00
fonsinchen
b31a1119fb
(svn r26286) -Fix: Thoroughly erase dead flows.
2014-01-29 19:55:29 +00:00
fonsinchen
91407b924e
(svn r26286) -Fix: Thoroughly erase dead flows.
2014-01-29 19:55:29 +00:00
fonsinchen
05b50ada5c
(svn r25963) -Fix [FS#5758]: Mixtures of old and new flows could create cycles.
2013-11-10 15:18:49 +00:00
fonsinchen
962d6d7e48
(svn r25963) -Fix [FS#5758]: Mixtures of old and new flows could create cycles.
2013-11-10 15:18:49 +00:00
frosch
795e94c87b
(svn r25934) -Fix [FS#5793]: Do not access items from other pools in pool item destructors during pool cleaning.
2013-10-31 20:31:10 +00:00
frosch
2a16d139a2
(svn r25934) -Fix [FS#5793]: Do not access items from other pools in pool item destructors during pool cleaning.
2013-10-31 20:31:10 +00:00
fonsinchen
7025a145e3
(svn r25899) -Change: Restrict flows if links are restricted and don't normally pick them anymore.
2013-10-22 16:13:54 +00:00
fonsinchen
6524849386
(svn r25899) -Change: Restrict flows if links are restricted and don't normally pick them anymore.
2013-10-22 16:13:54 +00:00
fonsinchen
6580fd4b8f
(svn r25885) -Codechange: Keep paths sorted so that the ones with flow == 0 are in the back and don't have to be iterated over so often.
2013-10-19 17:15:19 +00:00
fonsinchen
b3b460cae2
(svn r25885) -Codechange: Keep paths sorted so that the ones with flow == 0 are in the back and don't have to be iterated over so often.
2013-10-19 17:15:19 +00:00
fonsinchen
c1d043f516
(svn r25637) -Fix: don't keep minimal routing information if automatic distribution has been disabled
2013-07-30 19:03:56 +00:00
fonsinchen
ca1c792144
(svn r25637) -Fix: don't keep minimal routing information if automatic distribution has been disabled
2013-07-30 19:03:56 +00:00
fonsinchen
e3807ed606
(svn r25424) -Fix: keep old flows around in an invalidated state to continue routing cargo if necessary
2013-06-17 20:38:11 +00:00
fonsinchen
f0119308f6
(svn r25424) -Fix: keep old flows around in an invalidated state to continue routing cargo if necessary
2013-06-17 20:38:11 +00:00
fonsinchen
450834a8ff
(svn r25422) -Fix: properly initialize base capacity for paths
2013-06-17 20:37:07 +00:00
fonsinchen
d9985c3331
(svn r25422) -Fix: properly initialize base capacity for paths
2013-06-17 20:37:07 +00:00
fonsinchen
bfd6f2bb85
(svn r25353) -Add: link graph job implementation
2013-06-09 12:57:41 +00:00
fonsinchen
22f56ffdd7
(svn r25353) -Add: link graph job implementation
2013-06-09 12:57:41 +00:00