dart-archive / isolate

Makes working with Dart isolates easier.
https://pub.dev/packages/isolate
BSD 3-Clause "New" or "Revised" License
90 stars 34 forks source link

Could you please provide an example of "Registry" use. #30

Closed MoacirSchmidt closed 5 years ago

MoacirSchmidt commented 5 years ago

Could you please provide an example of "Registry" use.

I would like to access sqlite database on spawed isolate but figured out that this is impossible since spawned isolates cannot use plugins.

So I was thinking if it is possible to share database data using registry in order for spawned isolate uses that to perform a long computation.

acherkashyn commented 5 years ago

Also would love to get some details about Registry. Documentation says:

/// Between isolates spawned using [Isolate.spawn] from the same initial
/// isolate, most objects can be sent.
/// Only simple objects can be sent between isolates originating from different
/// [Isolate.spawnUri] calls.

What does "most objects" and "simple objects" mean in this context?

lrhn commented 5 years ago

Added examples.

ramsestom commented 4 years ago

Added examples.

Where?

lrhn commented 4 years ago

In the documentation of the Registry class, in version 2.0.3, which is apparently not published yet (even though the changelog for it is). Something has gone wrong somewhere.