Commit graph

8 commits

Author SHA1 Message Date
Andrew Kaster
c19ecf33d9 LibThreading: Clean up pthread mutex attributes and mutex itself 2025-02-20 15:04:50 -07:00
stasoid
778947213b ImageDecoder: Port to Windows 2025-02-14 09:38:59 -07:00
Timothy Flynn
5f9ed343b3 LibThreading: Pass ownership of a BackgroundAction result to its caller
There is no need to create a copy of potentially expensive structures.
2025-02-10 16:05:43 +00:00
Timothy Flynn
f20aa82c27 LibThreading: Avert a reference cycle in BackgroundAction
When a BackgroundAction completes, it resolves a Promise (stored on the
BackgroundAction object) with a reference to itself. The Promise will
never unset this resolved value, thus it will hold a strong reference to
the BackgroundAction until it is destroyed. But because the Promise is
owned by the BackgroundAction itself, we have a reference cycle, and
neither object can be destroyed.

The only user of BackgroundAction is the ImageDecoder process. The
consequence was that the ImageDecoder process would never release any
image data for successfully decoded images.

To fix this, instead of storing the promise on the class itself, we can
just create it as a local variable and pass it around.
2025-02-10 16:05:43 +00:00
Tim Ledbetter
5d4aa15ada LibThreading: Make MutexLocker [[nodiscard]] 2025-01-10 13:21:36 +00:00
stasoid
15a96e841b Meta: Make pthread and mman available for all libraries on Windows
by default
2024-12-18 05:55:58 +01:00
stasoid
85da489f39 LibThreading: Build on Windows 2024-12-08 17:19:42 -07:00
Timothy Flynn
93712b24bf Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00