Commit graph

5022 commits

Author SHA1 Message Date
7cc174808e GCC-7: disable pre-C++17 warning
This warning is only relevant when object files compile with and without
C++17 language level are to be linked into a single executable; starting
with C++17, new style 'noexcept' specifications will become part of the
function signature and thus part of the mangled function name. Linkiing
mixed object files might fail in such a situation.

Obviously this warning is not relevant for us; moreover we plan to
upgrade to C++17 soon
2018-04-26 11:40:39 +02:00
5f0af2495b Test-Fix: possible race in test setup
On rare occasions, the test thread itself consumes faster than the producer threads feed new test data.
Make sure the test does not hangin such a situation
2018-04-26 10:54:13 +02:00
6b56b46b6a Library: disambiguate forwarding assignment
we allow assignment to the element embedded within the wrapper.
Yet obviously we need specific implementations for assignment
to the container itself. Thus we define the templated
assignment operator such as to render the explicit specialisation
a better match than anything generated from the templated
operator
2017-08-22 19:37:44 +02:00
f72b97bd9c Library: add move operations to ItemWrapper 2017-08-20 22:09:37 +02:00
e46d23bd62 GCC-5 compatibility: need 1/3 more inline buffer space
GCC-5 requires more storage for some basic data types
Most notably std::string is now way larger than void*
2017-08-17 13:24:34 +02:00
ae2a9f0953 GCC-5 compatibility: fix some simple output matches in testsuite
GCC-5 produces slightly different output formatting
2017-08-17 12:50:25 +02:00
937ad64596 DiffMessage: now uniformly plays the role of MutationMessage (closes #1066) 2017-08-13 07:25:32 +02:00
82a12115c3 DiffMessage: complete documentation 2017-08-13 07:25:32 +02:00
5ea80f39cb DiffMessage: successfully finish extended integration test
now we're able to inject flocks of Borg into the alpha quadrant by diff message
2017-08-13 07:25:32 +02:00
3b547ce3d0 DiffMessage: basically got the integration test to work
...still with lots of diagnostic messages,
and need to fine tune the balance between generator and consumer,
in order to produce more interesting patterns.
Also need to verfiy the results automatically

Problems while building the test fixture: several, most notably again
the dangers when combining lambdas and multithreading. The most glorious
mistake was to capture the notifyGUI function, which led to locking
a corrupted uiDispatcher queue, causing deadlock.

Problems in the actual test subject: seemingly none.
Message passing and diff application works like a charm!
2017-08-13 07:25:32 +02:00
f7402ef89d Library: allow to consume an iterator while taking the snapshot 2017-08-13 07:25:32 +02:00
255958b23b Library: fix yet another misconception in iterator comparison
...again the situation when we want to use Lumiera iterators
in a stadard "for each" loop
2017-08-13 00:07:38 +02:00
7e9bb1fb5d DiffMessage: elaborate integration test... 2017-08-12 23:02:00 +02:00
fb81751b91 DiffMessage: draft multithreaded integration test of diff application (#1066)
...because it seems adequate really to cover the whole invocation pattern
in a laboratory setup, including the twist to pass thread boundraries.
2017-08-12 19:32:57 +02:00
b45ffe5cbe DiffMessage: fix insidious initialisation bug (related to #963)
basically DiffMessage has a "take everything" ctor, which happens
to match on type DiffMessage itslef, since the latter is obviously
a Lumiera Forward Operator. Unfortunately the compiler now considers
this "take everyting" ctor as copy constructor. Worse even, such a
template generated ctor qualifies as "best match".

The result was, when just returing a DiffMessage by value form a
function, this erroneous "copy" operation was invoked, thus wrapping
the existing implementation into a WrappedLumieraIterator.

The only tangible symptom of this unwanted storage bloat was the fact
that our already materialised diagnostics where seemingly "gone". Indee
they weren't gone for real, just covered up under yet another layer of
DiffMessage wrapping another Lumiera Forward Iterator
2017-08-12 18:16:06 +02:00
5fbc4b84bf DiffMessage: switch to moving DiffMessage over the bus
basically the opaque-buffer based MutationMessage implementation is obsoleted now
2017-08-12 17:59:02 +02:00
32f2d6ed9a IterSource: optimise hand-over at construction
by moving, we can avoid the generation of up to 3 additional shared copies
of the DataHandle. The whole invocation now works without touching any shared count
and thus without incurring a memory barrier...
2017-08-12 16:27:30 +02:00
b9acb3f50f DiffMessage: complete test coverage 2017-08-12 14:48:35 +02:00
06ff5c4e71 DiffMessage: complete test of diagnostic output 2017-08-12 14:33:26 +02:00
efc27fd07b DiffMessage: draft content diagnostics wrapper 2017-08-12 05:55:31 +02:00
d4ac2d78e2 C++11: improve moving and forwarding of iterators
this becomes more relevant now, since the actual MutationMessage iterators
are implemented in terms of a shared_ptr to IterSource. Thus, when building
processing pipelines, we most definitively want to move that smart-ptr into
the destination, since this avoids touching the shared count and thus avoids
generating unnecessary memory barriers.
2017-08-12 03:01:35 +02:00
4a2384e242 DiffMessage: add further convenience ctor for varargs
hey... all my dream constructors became true
2017-08-12 03:00:38 +02:00
380fa5bb38 DiffMessage: add further convenience ctors for STL containers 2017-08-11 22:23:51 +02:00
7dc0fdd67a DiffMessage: implement convenience ctor to build from Lumiera Iterator 2017-08-11 21:27:51 +02:00
9e4f3f3314 metaprogramming: switch util-foreach to variadic templates (#967)
...likewise low hanging fruit
2017-08-11 20:35:53 +02:00
a731b3caf4 metaprogramming: get rid of the remaining boost::enable_if usages
...low hanging fruit
2017-08-11 20:23:46 +02:00
8c1a43a6b3 metaprogramming: switch util-foreach to our own enable_if implementation
...allows us to get rid of quite some boost-includes
Incidentally, "our own" implementation is equivalent to both the
boost implementation and the implementation from C++14
It is just a bit more concise to write.
2017-08-11 20:02:37 +02:00
6ee8737a17 WIP: dream up a conveninence interface 2017-08-11 19:28:16 +02:00
a0040fe6ab DiffMessage: basic test case PASS 2017-08-11 19:11:14 +02:00
9ad0dd9918 DiffMessage: start with drafting the most simple test case
damn it!
why the hell is the C++ language so tedious to write....
even after years of practice you need hours to get the most basic stuff to fly
2017-08-11 18:34:23 +02:00
9d5d758f0c IterSource: use human readable source type diagnostics 2017-08-11 17:08:49 +02:00
dfd3dc1275 DiffMessage: reshape IterAdapter to allow for custom diagnostics
since we do not want to increase the footprint, we're bound to reuse
an existing VTable -- so IterAdapter itself is our only option.
Unfortunately we'll need to pass that through one additional
decoration layer, which is here the iterator; to be able to
add our string conversion there, we need to turn that into
a derived class and add a call to access the underlying
container, which gets us into element type definition mess....
2017-08-11 16:56:18 +02:00
88b2260496 DiffMessage: draft test steps to drive refactoring 2017-08-11 15:48:28 +02:00
f6baef16c5 DiffMessage: consider to unite the handling of mutation messages (#1066) 2017-08-11 15:23:33 +02:00
f498f3be1b mark next steps to address
- error handling
 - settle MutationMessage
2017-08-11 02:37:29 +02:00
fdcf431a9b DiffMesage: use as payload within MutationMessage and pass Diff by RValue
now this highlights the unsettled decision still the more,
as can be seen by all that unnecessary copying. Basically we move the
Diff into the lambda-closure, from there into an anonymous instance,
from there into the embedded Buffer in MutationMessage, which again
just happens to sit in the closure storage when the action is invoked.
And all of this copying just to move the DiffMessage for consumption
into the TreeMutator...

thus by #1066 we should really get rid of the MutationMessage class altogether!
2017-08-11 02:00:54 +02:00
fd0a011ea4 DiffMessage: bold attempt towards a way to produce diffs (#1066)
actually I do not know much regarding the actual situation when,
within the Builder run, we're able to detect a change and generate
a diff description. However, as a first step, I'll pick IterSrouce
as a base interface and use a "generation context", which is to be
passed by shared-ptr
2017-08-11 00:59:10 +02:00
ae5e324a93 Commands: switch default invocation path to variadic templates (#967) 2017-08-10 22:17:02 +02:00
c324d2e594 Proc-Commands: remove a function we likely won't need ever (closes #291) 2017-08-10 21:52:51 +02:00
2344d5b03f UI-top-level: implement external UI-Shutdown-Trigger 2017-08-10 20:58:00 +02:00
5299185c2b differentiate the severity levels for user notification (#1102)
basically we want a non-modal notification box in the UI,
which normally stays out of the way. A good example of how such
can be accomplished can be found in the Ardour UI.

This leads to the conclusion that we want to differentiate between
varoius degees of severity; some error conditions just can not be
ignored, and must be indicated in an obvious way, e.g. a prominent
nonmodal pop-up to appear for some seconds, while others just warant
an unobstrusive warning sign
2017-08-10 20:57:59 +02:00
805e6047ba UI-Dispatch: document some implementation intricacies 2017-08-10 20:57:59 +02:00
d8c19c7a32 UI-Dispatch: complete implementation of the hand-over (closes #1098)
...by integrating and wiring a Glib::Dispatcher
2017-08-10 20:57:43 +02:00
768a07f181 UI-Dispatch: draft the dispatcher invocation 2017-08-10 17:14:44 +02:00
07c9ed15e8 UI-Dispatch: how to integrate into the NotificationService
WIP setup of an empty framework
2017-08-10 16:24:36 +02:00
46fc900980 UI-Dispatch: get the multithreded test to work (#1098)
the (trivial) implementation turned out to be correct as written,
but it was (again) damn challenging to get the mulithreaded chaotic
test fixture and especially the lambda captures to work correct.
2017-08-07 05:19:58 +02:00
a7ad82c935 Library: can optimise IterStack pop()
...by moving out the element to be extracted;
because of RVO it will in fact be move constructed into
the storage of the caller
2017-08-07 00:20:55 +02:00
70e1a5b922 convert ScopedCollection to rely on C++11
- variadic templates
- type traits
- use uniqe_ptr to manage storage (instead of boost::scoped_array)
2017-08-06 18:21:25 +02:00
0b621e71c5 Library: fix a suptle misconception in the design of IterAdapter
again surprising how such fundamental bugs can hide for years...

Here the reason is that IterAdapter leaves the representation of "NIL" to
its instantiation / users; some users (here in for example the ScopedCollection)
can choose to allow for different representations of "NIL", but the comparison
provided by IterAdapter just compares the embedded pos by face value.
2017-08-06 16:58:22 +02:00
908d1a8faa test need to be linked against liblumierabackend
...while tests in the library subdirectory are linked only against
liblumierasupport, which does not provide the multithreading support

In this special case here the actual facility to be tested does not rely
on thread support, only on locking. But the stress test obviously needs
to create several threads. Simple workaround is to move the test into
a test collection linked against all of the application core...
2017-08-06 15:30:01 +02:00