mirror of
https://github.com/barrucadu/dejafu.git
synced 2024-11-23 22:23:18 +03:00
Document why to use concurrency over alternatives.
This commit is contained in:
parent
a0181bde42
commit
78834ca770
@ -30,6 +30,26 @@ it was split out into its own package.
|
||||
The documentation of the latest developmental version is
|
||||
[available online][docs].
|
||||
|
||||
Why and not something else?
|
||||
---------------------------
|
||||
|
||||
- **Why not base:** like lifted-base, concurrency uses typeclasses to
|
||||
make function types more generic. This automatically eliminates
|
||||
calls to `lift` in many cases, resulting in clearer and simpler
|
||||
code.
|
||||
|
||||
- **Why not lifted-base:** fundamentally, lifted-base is still using
|
||||
actual threads and actual mutable variables. When using a
|
||||
concurrency-specific typeclass, this isn't necessarily the case. The
|
||||
dejafu library provides non-IO-based implementations to allow
|
||||
testing concurrent programs.
|
||||
|
||||
- **Why not IOSpec:** IOSpec provides many of the operations this
|
||||
library does, however it uses a free monad to do so, which has extra
|
||||
allocation overhead. Furthermore, it does not expose enough of the
|
||||
internals in order to accurately test real-execution semantics, such
|
||||
as relaxed memory.
|
||||
|
||||
Contributing
|
||||
------------
|
||||
|
||||
|
@ -38,6 +38,25 @@ description:
|
||||
This used to be part of dejafu, but with the dejafu-0.4.0.0 release,
|
||||
it was split out into its own package.
|
||||
.
|
||||
== Why and not something else?
|
||||
.
|
||||
* Why not base: like lifted-base, concurrency uses typeclasses to
|
||||
make function types more generic. This automatically eliminates
|
||||
calls to `lift` in many cases, resulting in clearer and simpler
|
||||
code.
|
||||
.
|
||||
* Why not lifted-base: fundamentally, lifted-base is still using
|
||||
actual threads and actual mutable variables. When using a
|
||||
concurrency-specific typeclass, this isn't necessarily the case.
|
||||
The dejafu library provides non-IO-based implementations to allow
|
||||
testing concurrent programs.
|
||||
.
|
||||
* Why not IOSpec: IOSpec provides many of the operations this
|
||||
library does, however it uses a free monad to do so, which has
|
||||
extra allocation overhead. Furthermore, it does not expose enough
|
||||
of the internals in order to accurately test real-execution
|
||||
semantics, such as relaxed memory.
|
||||
.
|
||||
See the <https://github.com/barrucadu/dejafu README> for more
|
||||
details.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user