- 🚮 Removed
bpjs
from JS scope. Programs must usebp
now. - 🚮 Polished the interface for adding BThreads to a program: 1 method instead of 3.
- 🐛 Fixed an issue where external events were re-ordered while checking for daemon mode termination.
- 🐛 A BProgram now quits when there are no more BThreads, even if there are enqueued external events.
- 🐛 Fixed typos in error messages.
- 🔄 Reduces method accessibility to minimum (nothing is
public
unless it has to be). - ✨ More documentation.
- ✨ A class for running bpjs files.
- 👍 Efficient use of
Context
, so that we don't open and exit it all the time. - 🚮 More removal of more unused code. We now have less unused code. Less is more, especially with unused code.
- 🔄
breakUpon
is nowinterrupt
. This leavesbreakUpon
to be later used as a language construct rather than absync
parameter.
- 🚮 ✨ 🐘 Big refactoring and clean-up towards enabling search.
BThread
s removed from engine - main new concept is that an execution of a BThread is a series ofBThreadSyncSnapshot
, advanced/connected byBPEngineTask
s. A BProgram is an execution environment for multiple BThreads (plus some state and management code).
- 🐛
breakUpon
handlers are evaluated in theBThread
's context, rather than in theBProgram
one.
- ✨ Updated the logging mechanism from global, single level to 3-level. Code change required:
bplog("hello") -> bp.log.info("hello)
. Also supportswarn
andfine
. - 🚮
bpjs
is deprecated (but still works). Please usebp
now. - 🚮 positional bsync deprecated (but still works). Please use the named-argument variant
bsync({request:....})
. - 🚮 BThread is not exposed in Javascript via
bt
(that was never used). - ✨ BThreads can now enqueue external events using
bp.enqueueExternalEvent()
. - ✨ BThreads can now specify a function that will be executed if they are removed because an event in their
breakUpon
event set was selected. UsesetBreakUponHandler( function(event){...} )
.
- ✨ Restructured the engine with JS proxies - javascript code has no direct interaction with the Java engine parts!
- 👍 More unit tests and examples
- Restructured the engine with JS proxies - javascript code has no direct interaction with the Java engine parts!
- More unit tests and examples
-
✨ BEvents now have an associated
data
object. See example here -
✨ New way of creating
BEvent
s: a static method namednamed
:new BEvent("1stEvent") // old BEvent.named("1stEvent") // new and English-like.
Future usaged include the ability to reuse event instances, but we're not there yet.
-
✨ Added support for Javascript definition of event sets:
var sampleSet = bpjs.EventSet( function(e){ return e.getName().startsWith("1st"); } );
-
✨ Support for
breakUpon
inbsync
s:bsync( {request:A, waitFor:B, block:C, breakUpon:D})
-
✨
SingleResourceBProgram
- a convenience class for the common case of having a BProgram that consists of a single file.
- 🔄 BProgram's
setupProgramScope
gets a scope as parameter. So no need to callgetGlobalScope
, and it's clearer what to do. - ✨
RWBStatement
now knows which BThread instantiated it - ✨ When a program deadlock,
StreamLoggerListener
would print theRWBStatement
s of allBThreads
.
Legend:
- 🔄 Change
- ✨New feature
- 🚮 Deprecation
- ⬆️ Upgrade
- 🐛 Bug fix