isolate_pool_executor 2.2.1
isolate_pool_executor: ^2.2.1 copied to clipboard
Just like a thread pool, but with isolates. The Isolate Pool Executor is a tool in Dart for managing concurrent tasks by limiting and reusing isolates to optimize performance.
2.2.1 #
- Fix the bug where the keepAliveTime parameter of IsolatePoolExecutor is ineffective.
2.2.0 #
- Optimize the content of the lints.
2.1.0 #
- customizeTaskInvoker adds new parameters: taskLabel, what, and tag, derived from the corresponding parameters in compute.
Breaking Changes #
- The tag parameter in compute will be sent to the isolate. Note that you should verify whether the parameter value can be sent. https://api.dart.dev/dart-isolate/SendPort/send.html
2.0.0 #
- Allow customization of task execution in Isolate.
- Fix
onIsolateCreatedbug - Improve the ability to capture task exceptions
- Modify debugLabel name
1.2.3 #
- Allow obtaining the content of the message before submitting the task for calculating the order.
1.2.2 #
- Fixed the task execution exception when
taskQueueInIsolateis set totrueinSingleIsolate.
1.2.1 #
- In non-release mode (determined by
assert), the default creation waiting time is changed to 6 seconds. In release mode, it remains unchanged at 3 seconds.
1.2.0 #
- Added a new parameter
onIsolateCreateTimeoutTimesDoNotCreateNew. If isolate creation times outnconsecutive times, no new isolates will be created, and only the already initialized isolates will be used. If no timeouts occur, the pool will use the isolates withmcores, along with other cached isolates. - This feature can help alleviate this issue. See the README for more details.
1.1.5 #
- Added the
immediatelyStartedCoreparameter toIsolatePoolExecutorandIsolatePoolExecutor.newFixedIsolatePool, allowing customization of the number of isolates that start immediately.
1.1.4 #
- The
isolateValuesin theonIsolateCreatedcallback is now non-nullable and will default to an empty map. - Added
isShutdownto the pool to check ifshutdownhas been called. - Updated the README to include instructions on calling
MethodChannelfrom an isolate in Flutter.
1.1.3 #
- The return value of
computeis now wrapped inTaskFuture, allowing you to view the currenttaskIdand relatedtag.
1.1.2 #
- Added support for specifying a
debugLabelforIsolatePoolExecutor.
1.1.1 #
-
Added a new
onIsolateCreatedparameter, which is called immediately after an isolate is created. This, along withisolateValues, allows initialization of data for the isolate.
Example: Introducing background isolate channels.
- Interaction with isolates now uses
RawReceivePort.
1.1.0 #
- Optimized initial isolate startup by directly assigning tasks, reducing one send operation, and improved idle state detection for isolates.
- Added timeout validation for isolate startup due to this known issue.
- Added a parameter
launchCoreImmediately(defaultfalse), which starts all core isolates immediately.
1.0.6 #
- Fixed
QueueEmptyinnewCachedIsolatePoolto prevent adding any tasks.
1.0.5 #
- Threw an exception when sending tasks failed.
- Added global exception handling for workers in isolates.
1.0.4 #
- Added common extension methods.
1.0.3 #
- Optimized communication times in
IsolateNoCache, bringing performance close toIsolate.run.
1.0.2 #
- Added support for storing
mapvalues during isolate initialization. - Optimized isolate exit mechanism when
keepAliveTimeis set to 0. - Improved data transfer between isolates.
1.0.1 #
- Refined code structure. When using a single isolate, tasks can be sent directly to the isolate without a queue.
1.0.0 #
- First version completed with 3 common creation methods implemented by default.