lumiera_/tests/11locking.tests
Ichthyostega 3af6a54219 Library/Application: complete technology switch (closes #1279)
As follow-up to the rework of thread-handling, likewise also
the implementation base for locking was switched over from direct
usage of POSIX primitives to the portable wrappers available in
the C++ standard library. All usages have been reviewed and
modernised to prefer λ-functions where possible.

With this series of changes, the old threadpool implementation
and a lot of further low-level support facilities are not used
any more and can be dismantled. Due to the integration efforts
spurred by the »Playback Vertical Slice«, several questions of
architecture could be decided over the last months. The design
of the Scheduler and Engine turned out different than previously
anticipated; notably the Scheduler now covers a wider array of
functionality, including some asynchronous messaging. This has
ramifications for the organisation of work tasks and threads,
and leads to a more deterministic memory management. Resource
management will be done on a higher level, partially superseding
some of the concepts from the early phase of the Lumiera project.
2023-10-16 01:44:04 +02:00

34 lines
666 B
Text

TESTING "Locking" ./test-locking
TEST "mutex section" mutexsection <<END
out: mutex locked section 1
out: mutex locked section 2
END
TEST "mutex not unlocked asserts" mutexforgotunlock <<END
return: 134
END
TEST "mutex explicitly unlocked" mutexexplicitunlock <<END
return: 0
END
TEST "nested mutex section" nestedmutexsection <<END
out: outer mutex locked section
out: inner mutex locked section
END
TEST "chained mutex section" chainedmutexsection <<END
out: ^outer mutex locked section
out: inner but not outer mutex locked section
END
TEST "recursive mutex section" recursivemutexsection <<END
out: recmutex locked once
out: recmutex locked twice
END