83#include <boost/lexical_cast.hpp>
95 using boost::lexical_cast;
96 using std::this_thread::sleep_for;
97 using std::chrono::microseconds;
98 using namespace std::chrono_literals;
165#define __DELAY__ sleep_for (20ms);
195 .captureUndo (capture)
196 .undoOperation (undoIt)
266 string cmdID {COMMAND_I1};
338 cmdIDs_.push_back (
_Fmt(
"%s.thread-%02d.%d") % COMMAND_ID % id_ %
j);
352 thread_.
join().maybeThrow();
354 Command::remove (
cStr(
id));
363 for (
uint j=0;
j<NUM_INVOC_PER_THRED; ++
j)
375 SessionCommand::facade().trigger (
msg.idi.getSym(),
msg.data.get<Rec>());
381 if (
not MAX_RAND_DELAY_us)
return;
382 sleep_for (microseconds (1 +
random_.i(MAX_RAND_DELAY_us)));
390 for (
uint i=0; i<NUM_THREADS_DEFAULT; ++i)
391 for (
uint j=0;
j<NUM_INVOC_PER_THRED; ++
j)
397 for (
uint i=0; i<NUM_THREADS_DEFAULT; ++i)
404 sleep_for (microseconds (MAX_RAND_DELAY_us * NUM_INVOC_PER_THRED / 2));
Utility to produce member IDs for objects belonging to a "Family", as defined by a distinguishing typ...
Token or Atom with distinct identity.
A one time N-fold mutual synchronisation barrier.
Variant of the standard case, requiring to wait and join() on the termination of this thread.
lib::Result< RES > join()
put the caller into a blocking wait until this thread has terminated
object-like record of data.
Duration is the internal Lumiera time metric.
Offset measures a distance in time.
a mutable time value, behaving like a plain number, allowing copy and re-accessing
Lumiera's internal time value datatype.
Helper class used solely for defining a Command-Object.
auto operation(FUN operation_to_define)
Handle object representing a single Command instance to be used by client code.
static bool remove(Symbol cmdID)
Command storeDef(Symbol newCmdID) const
create a clone definition
Global access point to invoke commands and cause edit operations within the Session.
static lib::Depend< SessionCommand > facade
static storage for the facade access front-end
static lib::Depend< SteamDispatcher > instance
storage for Singleton access
void perform_simpleInvocation()
SessionCommandFunction_test()
void perform_massivelyParallel(Arg args_for_stresstest)
~SessionCommandFunction_test()
void perform_messageInvocation()
virtual void run(Arg args_for_stresstest)
Any copy and copy construction prohibited.
A front-end for using printf-style formatting.
Actually defining a command and binding it to execution parameters.
void lumiera_interfaceregistry_init(void)
Initialise the interface registry.
void lumiera_interfaceregistry_destroy(void)
Global registry for interfaces (extension points).
lib::time::Time randTime()
create a random but not insane Time value between 1s ... 10min + 500ms
boost::rational< int64_t > FSecs
rational representation of fractional seconds
void throwOnError()
Check the lumiera error state, which maybe was set by C-code.
void maybeOverride(uint &configSetting, Arg cmdline, uint paramNr)
Steam-Layer implementation namespace root.
Test runner and basic definitions for tests.
bool isnil(lib::time::Duration const &dur)
Simplistic test class runner.
#define LAUNCHER(_TEST_CLASS_, _GROUPS_)
Major public Interface to the Session subsystem of Lumiera GUI.
Dispatch and execute mutation operations on the High-level model.
generic data element node within a tree
Marker types to indicate a literal string and a Symbol.
CStr cStr(std::string const &rendered)
convenience shortcut: forced conversion to c-String via string.
A N-fold synchronisation latch using yield-wait until fulfilment.
A collection of frequently used helper functions to support unit testing.
Convenience front-end to simplify and codify basic thread handling.
Creating series of type-based contexts.
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...