nanolith
Advanced tools
Changelog
0.3.1 - 2022-29-12
SharedMap.option
only accessible statically and not on instances.MessengerList.list()
to be a getter method instead of a regular function. New syntax is MessengerList.list
.SharedMap.get()
to use .subarray()
instead of .slice()
for a slight memory complexity improvement.SharedMap
's constructor.pool.option
back to a regular getter property instead of a static one. Doesn't need to be static.Service
, ServiceCluster
, and pool
.Messenger
+ a test suite for SharedMap
Changelog
[0.3.0] - 2022-29-12
__beforeServiceTask
and __afterServiceTask
hooks in favor of universal __beforeTask
and __afterTask
hooks with new context..shift()
instead of .splice()
.TaskHook
s to contain the name of the task being called and whether or not it's being called within a service.ServiceCluster.launch
to disallow negative or non-whole numbers.parent
to MainThread
, which makes much more sense anyways since the parent thread is always the main thread in Nanolith.messengers
to MessengerList
.MessengerList.seek()
to MessengerList.list()
.__afterTask
hook being called after the returned value was posted back to the main thread instead of before.HookDefinitions
keys in Tasks
type.SharedMap
instances, otherwise the thread would hang even if nothing else is happening.SharedMap
with an empty object.SharedMap
instances rather than throwing an error.SharedMap
based on the previous value. This is fantastic for high-concurrency parallel operations and eliminates all race conditions.Nanolith.clusterize
method for easy creation of a service cluster and launching services all at the same time.Changelog
[0.2.5] - 2022-24-12
SharedMap
implementationBytes
enum export to help users with calculating sizes for their SharedMap
snotifyAll()
method to ServiceCluster
to send messages to all services on the cluster with one function call.NodeNext
module resolution.SharedMap
.timeoutSecs
parameter to prepareWritableToPortStream()
to configure how many seconds to wait for the stream to be accepted before rejecting the promise.TaskWorkerOptions
and ServiceWorkerOptions
types to be exported as LaunchTaskOptions
and LaunchServiceOptions
instead.SharedArrayPair
and MessengerTransferData
.SharedArrayPair
type name to SharedMapTransferData
.Messenger.transfer()
to be a getter instead of a function.Data
word from exports of SharedMapTransferData
and MessengerTransferData
.pool.option
to be a static property.moduleResolution
to NodeNext.