reuk
da09b99bbf
MessageManager: Add callSync counterpart to callAsync
2025-02-05 10:59:51 +00:00
reuk
29cf6ecf04
MessageManager: Update callAsync to take an arbitrary callable instead of a function
2025-02-04 13:15:44 +00:00
Anthony Nicholls
6c2d149ef3
Versioning: Add the JUCE version number to any internally created threads
2024-09-26 08:10:56 +00:00
Tom Poole
94d98a2b10
Update licensing information
2024-04-16 11:39:35 +01:00
Anthony Nicholls
5c8b7fe0e1
MessageMangerLock: Fix a race condition
2023-10-13 16:23:15 +01:00
Tom Poole
6bf9bb9a2e
Add final specifiers in implementation files
2023-10-10 16:12:38 +01:00
reuk
d47a7d18c1
MessageManager::Lock: Protect Lock from concurrent accesses
...
Previously, the Lock was not thread-safe when multiple threads were
locking/unlocking a single Lock instance simultaneously. This
isn't normally a problem when using the MessageManagerLock type, because
each MessageManagerLock contains its own private MessageManager::Lock,
and it's not possible for multiple threads to modify that private lock.
This change improves safety when using a MessageManager::Lock in the
manner of a CriticalSection or other JUCE lock type.
2023-08-23 11:14:33 +01:00
reuk
33e81616ad
MessageManager: Improve thread safety of Lock type
...
Previously, the following sequence of events was possible:
Background thread Main thread
------------------------------------------------------------------------
Lock::tryAcquire()
Run to blockingMessage->post()
BlockingMessage::messageCallback()
Run to abortWait.set (1)
Lock::tryAcquire()
Exit through return true
Lock::~Lock()
Destroy memory used for Lock
BlockingMessage::messageCallback()
Execute lockedEvent.signal()
Memory already freed, crash
2023-05-02 19:37:47 +01:00
Anthony Nicholls
05d5c94990
Native: Rename all native files for improved consistency
2023-04-04 19:54:29 +01:00
reuk
10bd8235e7
Plugin Client: Move all private helper functions into detail namespace
2023-03-13 13:09:30 +00:00
attila
d246cc280d
MessageManager: Add mutex to isThisTheMessageThread() and setCurrentThreadAsMessageThread()
2022-07-14 19:18:27 +00:00
Tom Poole
83176e23ca
Add a version ID macro
2022-06-16 11:16:33 +01:00
Tom Poole
dea3fe60e4
Update copyright banners
2022-04-04 12:36:32 +01:00
ed
11d872ea1b
MessageMananger: Made dispatchNextMessageOnSystemQueue() accessible by internal code
2021-04-13 16:25:04 +01:00
ed
76d5c07c66
MessageManager: Only reinitialise platform-specific code on Windows when calling setCurrentThreadAsMessageThread()
2021-04-08 11:51:41 +01:00
Tom Poole
894e7d2bd2
Updated all license headers
2020-04-23 17:30:39 +01:00
ed
59a058fdc6
Fixed some warnings flagged up when enabling -Wswitch-enum, -Wswitch-default, -Wredundant-decls, and -Wimplicit-fallthrough
2020-03-09 17:39:28 +00:00
reuk
c80285463a
MessageManager: Obey the rule of useful return in callAsync
2019-08-30 17:13:21 +01:00
ed
922730f685
Whitespace
2019-07-12 14:44:34 +01:00
Tom Poole
79d3e8b3f5
Windows: Removed some VS2013 workarounds
2019-07-11 15:28:41 +01:00
jules
0367d5c3a9
Added some PopupMenu::addItem overloads which let you attach a lambda callback to be invoked for a menu item.
2019-06-19 11:39:28 +01:00
jules
cadac817c6
Enabled some more warning flags in Xcode, and fixed the problems they caused
2019-01-11 09:52:10 +00:00
jules
5979288706
Added some macros for asserting when functions are called in an unsafe manner outside the message thread.
2018-10-16 17:39:54 +01:00
jules
6fda0bffca
Fixed some stray zeros that were still being passed as null pointers
2018-10-05 12:15:04 +01:00
jules
1e6bbb8da9
Added some methods to allow ReferenceCountedObjectPtrs to be constructed or copied from references as well as pointers - as well as increasing safety, this actually makes things a bit more efficient as it skips a nullptr check. Updated lots of places in the code that could take advantage of this
2018-07-03 11:51:13 +01:00
jules
e2dcc32f88
Updated old code where the 'volatile' keyword was still being used
2018-05-01 09:19:50 +01:00
jules
48a5fbd333
Another batch of ScopedPointer cleanups
2018-01-10 14:49:57 +00:00
Tom Poole
8cecf0baf9
Assorted threading and undefined behaviour fixes
2017-12-11 16:37:17 +00:00
jules
f3cde9763a
Quick tidy-up of some messaging classes
2017-12-04 11:30:15 +00:00
jules
f85d706131
Some minor formatting and comment fixes
2017-11-28 17:46:15 +00:00
jules
2dc9316420
Misc ScopedPointer changes to start using reset() and get() rather than assignments and casts (part of an ongoing drift towards more std::unique_ptr compatibility)
2017-11-01 17:41:06 +00:00
hogliux
b9b34393d1
Improved scheduling when multiple threads are fighting for the MessageManagerLock
2017-10-19 12:55:37 +01:00
jules
eda613c6db
Moved all "namespace juce" declarations from module headers to the individual .h and .cpp source files. This makes life a lot easier for Intellisense and other IDE autocompletion tools
2017-09-08 08:59:55 +01:00
hogliux
b5afccc37c
Updated file headers and the README with the JUCE 5 license
2017-04-27 14:43:04 +01:00
jules
60e9231fb1
Removed need for std::function in order to use MessageManager::callAsync(). Used it to modernise a few bits of old code.
2017-03-29 15:31:41 +01:00
hogliux
42305de6da
Added method OpenGLContext::executeOnGLThread to help executing gl house-keeping tasks on the gl thread even when the message manager is locked
2017-02-14 20:20:32 +00:00
tpoole
2e84129479
Updated the juce_audio_basics, juce_audio_devices, juce_blocks_basics, juce_core and juce_events modules to a new ISC license
2016-12-14 10:07:26 +00:00
hogliux
c7b8e77031
Update copyright notice
2015-07-22 15:59:34 +01:00
jules
f799bb0d6b
Another fix for Windows builds with modal comps disabled.
2015-03-05 15:48:27 +00:00
jules
5fc76082e2
Fix for Windows builds with modal components disabled.
2015-03-05 15:42:45 +00:00
jules
89854c55b9
Added flag JUCE_COMPILER_SUPPORTS_LAMBDAS
2014-10-08 11:26:55 +01:00
jules
df3e039bf9
Added a handy static method MessageManager::callAsync() which can asynchronously invoke a lambda on the message thread.
2014-10-07 17:15:19 +01:00
jules
005f0be531
Better cleanup in MessageManagerLock to avoid spurious assertions when a lock fails on shutdown.
2014-08-17 12:25:07 +01:00
jules
7b8ab7b503
Changed MessageBase::post() to return a bool to detect failure in the OS message queue (which can happen under stress on win32), and used this to avoid some messaging classes getting stuck.
2014-07-16 21:33:11 +01:00
jules
619716751e
Tweaked the ScopedJuceInitialiser_GUI to use reference-counting internally, and used it to replace/simplify some similar objects in the plugin wrapper classes.
2014-05-28 11:06:48 +01:00
jules
505bdcea88
Allowed JUCEApplicationBase::quit() to be called from non-message threads on OSX.
2013-11-28 10:01:21 +00:00
jules
42aa27900b
Moved most of the functionality from JUCEApplication into JUCEApplicationBase, so that it can be used without needing juce_gui_basics to be present.
2013-09-07 09:43:45 +01:00
jules
6045915256
Fixed a namespace problem with the iOS build.
2013-09-02 16:34:56 +01:00
jules
5918d039ce
Added some "override" annotations.
2013-07-08 19:05:14 +01:00
jules
03c2801f3f
Copyright header update in all module files. juce_core modules are now ISC licensed. All other modules are GPLv2/3/AGPLv3
2013-06-13 13:17:12 +01:00