Open maks opened 1 year ago
//cc @lrhn
What can that ID be used for, if the VM service is not running?
Thank you for looking into this! 👍🏻 🙏🏻
@lrhn The context for my requesting this is the related request in #52977 so in order to be able to key on Isolate ID's instead of re-inventing the wheel in user code, trying to use the debugName
property which I think it's not intended for and then needing to do some sort of UUID generation to have unique values to set debugName
to.
Currently an Isolates unique, VM assigned ID number is only available via the VM service, eg using the vm_service package API.
This means it is not available when a Dart application is started with the VM service running and completely unavailable to AOT compiled Dart app executables.
Therefore I would like to propose adding a new property to the
Isolate
class in thedart:isolate
package probably better named than justnumber
that is currently available on theIsolate
class in thevm_service
package.While it's currently possible to somewhat work around this by using user created unique IDs assigned to an Isolates
debugName
this is not optimal for a number of reasons.