1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00
JUCE/modules
reuk 3768349a05
Font: Make Font and TypefaceCache threadsafe
Previously, it wasn't safe to access Font instances from multiple
threads because there was a chance that they might reference the same
shared internal state. In this case, calling getTypeface() or getAscent from
two threads simultaneously would cause a race on the typeface and ascent
data members, even though the Font instances appeared to be disjoint.

With this change in place, it is now safe to use Font instances from
multiple threads simultaneously.

It is still an error to modify the same Font instance from multiple
threads without synchronization!

    // Fine:
    Font a;
    Font b = a;

    auto futureA = std::async (std::launch::async, [&a] { /* do something with a */ });
    auto futureB = std::async (std::launch::async, [&b] { /* do something with b */ });

    // Bad idea:
    Font f;

    auto futureA = std::async (std::launch::async, [&f] { /* do something with f */ });
    auto futureB = std::async (std::launch::async, [&f] { /* do something with f */ });
2021-09-23 10:28:47 +01:00
..
juce_analytics Bump version number to 6.1.2 2021-09-20 12:15:47 +01:00
juce_audio_basics Bump version number to 6.1.2 2021-09-20 12:15:47 +01:00
juce_audio_devices iOS Audio: Allow specifying a fixed set of preferred sample rates 2021-09-22 10:23:04 +01:00
juce_audio_formats Bump version number to 6.1.2 2021-09-20 12:15:47 +01:00
juce_audio_plugin_client Linux windowing: Display utf-8 native window titles correctly 2021-09-21 11:01:31 +01:00
juce_audio_processors PluginHostType: Add Ableton Live 11 detection 2021-09-23 10:21:02 +01:00
juce_audio_utils AudioDeviceSelectorComponent: Always show the actual samplerate of the device 2021-09-22 10:23:05 +01:00
juce_box2d Bump version number to 6.1.2 2021-09-20 12:15:47 +01:00
juce_core Bump version number to 6.1.2 2021-09-20 12:15:47 +01:00
juce_cryptography Bump version number to 6.1.2 2021-09-20 12:15:47 +01:00
juce_data_structures Bump version number to 6.1.2 2021-09-20 12:15:47 +01:00
juce_dsp Projucer: Add option to automatically set up oneMKL in VS exporters 2021-09-22 10:23:04 +01:00
juce_events Bump version number to 6.1.2 2021-09-20 12:15:47 +01:00
juce_graphics Font: Make Font and TypefaceCache threadsafe 2021-09-23 10:28:47 +01:00
juce_gui_basics TreeView: Don't add MouseListener for nested custom components 2021-09-23 10:20:36 +01:00
juce_gui_extra Windows: Add WebView2Preferences struct to modify aspects of WebView2 behaviour 2021-09-22 13:50:53 +01:00
juce_opengl Font: Make Font and TypefaceCache threadsafe 2021-09-23 10:28:47 +01:00
juce_osc Bump version number to 6.1.2 2021-09-20 12:15:47 +01:00
juce_product_unlocking Bump version number to 6.1.2 2021-09-20 12:15:47 +01:00
juce_video Bump version number to 6.1.2 2021-09-20 12:15:47 +01:00
CMakeLists.txt BLOCKS: Remove juce_blocks_basics module 2021-05-19 16:53:01 +01:00