Skip to content

client_v2.0.0-internal.2.3.0

@kian-thompson kian-thompson tagged this 18 Jan 00:31
#
[AB#1343](https://dev.azure.com/fluidframework/internal/_workitems/edit/1343)

Cherry-pick of https://github.com/microsoft/FluidFramework/pull/13617

## Description

New `Container.dispose()` method that host can call when it knows nobody
is going to use container anymore.
This flow will be identical to today's `Contanainer.close()` but will
not raise `"readonly"` events (container will still raise `"closed"`
events). Components can leverage `"dispose"` events on runtime / data
stores to learn about this transition.

## Upcoming Breaking Changes

Future change in next major release will mean calling
`IContainer.close(...)` is no longer expected to dispose the container
runtime, document service, or document storage service.

If the container is not expected to be used after the `close(...)` call,
replace it instead with a `IContainer.dispose(...)` call. This change
will no longer switch the container to "readonly" mode and relevant code
should instead listen to the Container's "disposed" event.
Otherwise, to retain all current behavior, add a call to
`IContainer.dispose(...)` after every `close(...)` call (passing the
same error object if present).
Assets 2
Loading