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.
1 year ago
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
2 years ago
attila
d246cc280d
MessageManager: Add mutex to isThisTheMessageThread() and setCurrentThreadAsMessageThread()
2 years ago
Tom Poole
dea3fe60e4
Update copyright banners
3 years ago
ed
fc0f6b1f2f
Tidy up
3 years ago
Tom Poole
fe4ba9071b
Set the default value of JUCE_MODAL_LOOPS_PERMITTED to 0
See BREAKING-CHANGES.txt for more details.
3 years ago
ed
11d872ea1b
MessageMananger: Made dispatchNextMessageOnSystemQueue() accessible by internal code
4 years ago
ed
2bfed0b354
Removed some unnecessary JUCE_MODULE_AVAILABLE_* checks
5 years ago
Tom Poole
894e7d2bd2
Updated all license headers
5 years ago
Tom Poole
2d16374b14
Updated all license headers
5 years ago
ed
a54da0b832
Fixed some more typos
5 years ago
reuk
c80285463a
MessageManager: Obey the rule of useful return in callAsync
5 years ago
jules
0367d5c3a9
Added some PopupMenu::addItem overloads which let you attach a lambda callback to be invoked for a menu item.
6 years ago
Tom Poole
ff1dbf5f6d
Added a missing JUCE_API
6 years ago
reuk
4a294eaa39
Allow moving into AsyncCallInvoker
6 years ago
ed
a234721110
Added various clang-tidy modernize-* fixes
6 years ago
jules
cadac817c6
Enabled some more warning flags in Xcode, and fixed the problems they caused
6 years ago
jules
5979288706
Added some macros for asserting when functions are called in an unsafe manner outside the message thread.
6 years ago
jules
87042769b6
Tidied up some more old typedefs
7 years ago
jules
dee78f29f6
Misc cleanups and modernisation
7 years ago
jules
38295f332b
Converted some old typedefs to using declarations
7 years ago
Tom Poole
ab863a6dc2
Replaced all usage of ScopedPointer with std::unique_ptr
7 years ago
ed
cdbc28c18b
Add documentation tags
7 years ago
Tom Poole
8cecf0baf9
Assorted threading and undefined behaviour fixes
7 years ago
hogliux
b9b34393d1
Improved scheduling when multiple threads are fighting for the MessageManagerLock
7 years ago
jules
970eda679e
Added 'final' keyword to a lot of classes from which you really shouldn't be inheriting!
7 years ago
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
7 years ago
hogliux
b5afccc37c
Updated file headers and the README with the JUCE 5 license
8 years ago
tpoole
23ba2e49cf
Fixed VS2013 assignment operator compiler warnings
8 years ago
jules
60e9231fb1
Removed need for std::function in order to use MessageManager::callAsync(). Used it to modernise a few bits of old code.
8 years ago
hogliux
42305de6da
Added method OpenGLContext::executeOnGLThread to help executing gl house-keeping tasks on the gl thread even when the message manager is locked
8 years ago
hogliux
2da1bc5f41
Replace include guards with "#pragma once"
8 years ago
tpoole
2e84129479
Updated the juce_audio_basics, juce_audio_devices, juce_blocks_basics, juce_core and juce_events modules to a new ISC license
8 years ago
jules
2a1234b6ac
Simplified some inter-module dependencies and exception-catching fallbacks
9 years ago
jules
82b0a3628b
Added some comments regarding MessageManagerLocks
9 years ago
jules
02492b36b9
Lots of small whitespace tweaks.
9 years ago
hogliux
c7b8e77031
Update copyright notice
10 years ago
jules
89854c55b9
Added flag JUCE_COMPILER_SUPPORTS_LAMBDAS
10 years ago
jules
df3e039bf9
Added a handy static method MessageManager::callAsync() which can asynchronously invoke a lambda on the message thread.
10 years ago
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.
11 years ago
jules
42482fc5db
Spelling fix.
11 years ago
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.
11 years ago
jules
5a1112ab94
Updated the format of the header include guard macros.
12 years ago
jules
03c2801f3f
Copyright header update in all module files. juce_core modules are now ISC licensed. All other modules are GPLv2/3/AGPLv3
12 years ago
jules
ad33fca65a
Minor clean-ups and documentation.
12 years ago
jules
0ceeb573d8
Minor changes to avoid pedantic compiler warnings.
12 years ago
jules
93a86b2600
TabbedButtonBar fix. Small clean-ups.
13 years ago
jules
e905f52014
More internal message class refactoring/decoupling.
13 years ago
jules
31209dadfc
Simplified some message-handling code.
13 years ago
jules
a90aedce50
Small updates to ComponentBuilder, UnitTestRunner.
13 years ago