Releases: Chymyst/chymyst-core
Revamping the blocking replies
Renamed "SmartPool" to "BlockingPool" and simplified the thread info handling. More static checks for emission of static molecules. Radical rewrite of blocking molecules code without semaphores and without error replies, simplifying the API. The call reply.checkTimeout()
is eliminated: the reply emitters now always return Boolean
. New APIs for reply: ReplyEmitter.noReplyAttemptedYet
and B.futureReply
. Reactions will no longer throw exceptions to unblock waiting calls when errors occur. Instead, a better error recovery mechanism will be implemented. New functionality for thread pools: pool names and thread names for debugging, shorter pool creation syntax, thread group priority API. Thread pools no longer need to be shut down explicitly (although this is helpful if there are thousands of them). Added documentation chapter on Chymyst
as an evolution of Actor model.
Single-threaded scheduler
Static molecules are now restricted to a linear output context, in a similar way to blocking replies. Reaction schedulers now run on a single dedicated thread; site pools are eliminated. New examples: 8 queens and hierarchical map/reduce. Added a simple facility for deadlock warning, used for FixedPool
. Tutorial updated with a new "quick start" guide that avoids requiring too many new concepts. Miscellaneous bug fixes and performance improvements.
Game of Life
"Singleton" molecules and reactions are now called "static", which is more accurate. Added more tutorial examples, including fork/join and a fully concurrent Game of Life. Some code cleanups and optimizations in the reaction scheduler, especially for reactions with repeated input molecules and cross-molecule conditions (used in the implementation of the Game of Life). Support for pipelined molecules (an automatic optimization) makes molecule selection faster.
Published on Sonatype
New compile-time restrictions, towards guaranteeing single reply for blocking molecules. It is now not allowed to call blocking molecules inside closures or loops, or to emit replies in any non-linear code context (such as, under a closure or in a loop). Change of artifact package from code.chymyst
to io.chymyst
. This version is the first one published on Sonatype Maven repository.
Simplified code organization
A different mechanism now implements the syntax a()
for emitting molecules with Unit
values; no more auxiliary classes E
, BE
, EB
, EE
, which simplifies code and eliminates the need for whitebox macros. Breaking change: timeout(value)(duraction)
instead of timeout(duraction)(value)
as before. An optimization for the reaction scheduler now makes simple reactions start faster. The project build has been revamped: now there is a single JAR artifact and a single SBT project for JoinRun
, rather than 3 as before. A skeleton "hello-world" project is available in a separate repository. Chymyst
has been moved to a separate repository as well. Various improvements in the compile-time analysis of reactions: livelock detection now understands that molecules emitted under if/else
constructions are not always emitted.
Nonlinear patterns
Bug fix for a rare race condition with time-out on blocking molecules. New checkTimeout API to make a clean distinction between replies that need to check the timeout status and replies that don't. Documentation was improved. Code cleanups resulted in 100% test coverage. Revamped reaction site code now supports nonlinear input patterns.
Code strenghtening
Simplify API: now users need only one package import. Many more tutorial examples of chemical machine concurrency. Test code coverage is 97%. More compiler warnings enabled (including deprecation warnings). There are now more intelligent "whitebox" macros that generate different subclasses of M[T]
and B[T,R]
when T
or R
are the Unit
type, to avoid deprecation warnings with the syntax f()
.
Revamping all names and project layout
We now say "reaction site" instead of "join definition" and "emitting a molecule" instead of "injecting a molecule". The API has changed from join ( run { ... } )
to site ( go { ... } )
.
There are now more stringent checks on the code. Deprecation warnings and other warnings are enabled. The syntax f()
for functions with Unit
argument caused a deprecation warning that has now been eliminated, thanks to more sophisticated macros.