Henrik Rydgård
59a56d66c7
Add a "reason" argument to sleep_ms().
...
sleep_ms() should generally be avoided when possible. This can be used to try
to track down unnecessary sleeps by adding some logging.
This commit on its own doesn't actually add any logging.
2024-11-21 15:28:51 +01:00
Henrik Rydgård
b56eef487c
Strict mode checking - no way to forget detaching now.
...
And if we forget to attach, boom. Hopefully I caught all of them.
2023-01-05 08:38:52 +01:00
Henrik Rydgård
f4a6d291e1
Common: Capitalize setCurrentThreadName().
2021-04-30 23:02:36 -07:00
Henrik Rydgård
15382d5f94
Move threading utils from native to Common
2020-10-01 09:27:25 +02:00
Henrik Rydgård
ccc0331279
Move timeutil to Common. (Experiment to see how much work it is to move these).
2020-08-15 20:53:08 +02:00
Unknown W. Brackets
cc6115d875
Io: Join loading/manager threads more explicitly.
2019-09-28 11:18:42 -07:00
Unknown W. Brackets
7f84c87931
Loaders: Refactor chaining to avoid dup code.
2018-12-27 10:32:47 -08:00
Unknown W. Brackets
8b665ae696
Loaders: Depriorize disc streaming queue items.
...
We want the local items, if any, to load first. This gives us icons, etc.
2017-12-09 17:07:42 -08:00
Unknown W. Brackets
ee5b68f1fc
Loaders: Add cancelation to all file loaders.
...
Mainly, for HTTP which might be stalled trying to connect (especially if
you're not near your PC right now and it's in your recent, for example.)
2017-12-09 16:47:37 -08:00
Simonas Kazlauskas
597a1af85c
Add conservative locking arond Caching/HTTP FLs
...
Making them hopefully thread-safe.
2017-06-24 21:06:18 +03:00
Simonas Kazlauskas
3c3596dbf2
Make the Loader API thread-safe
...
Since the majority of the code is using ReadAt API already, map this to
a `readp` "syscall" which does not mutate any state about the file
descriptor therefore making it fairly safe multi-threading wise.
This allows to get rid of read-time mutexes in RamCachedFileLoader and
therefore fixes #9803
2017-06-23 17:23:43 +03:00
Henrik Rydgard
d64f367e1d
Assorted warning fixes
2017-03-05 10:52:45 +01:00
Henrik Rydgard
4a2812a30d
Fix two mutex issues in CachingFileLoader. See #9370
2017-03-02 10:18:56 +01:00
Henrik Rydgard
26a2d42731
Big mutex overhaul - remove our custom ones, make them non-recursive where possible
2017-02-28 11:40:29 +01:00
Henrik Rydgard
50be4e72b2
Get rid of our own silly reimplementation of std::thread
2017-02-27 20:51:36 +01:00
Unknown W. Brackets
65c7d0bd04
Add uncached flag for file loader reads.
...
This allows us to indicate that a read need not be cached.
2016-07-04 12:07:15 -07:00
Unknown W. Brackets
429346bb94
http: Make sure we don't hang checking existence.
...
It's not great to delay loading when the server is down - we'll do a
proper check when we display the games.
This also fixes shutdown being slow.
2016-07-04 00:46:42 -07:00
Unknown W. Brackets
8dd7527dc8
Clamp reads at the beginning too.
...
Safer, avoids an index overrun in disk cache.
2016-05-26 00:07:46 -07:00
Unknown W. Brackets
1c357f7f7b
Fix reads from cache outside the file.
...
Homebrew seems to all trigger us to read after the end of file, which was
looping infinitely. Fixes #8773 .
2016-05-25 18:42:21 -07:00
Unknown W. Brackets
da827d9ef0
Move file loader code into directories.
...
Not making sense to put these all in the same fiel anymore.
2015-07-02 20:58:53 -07:00