I'm currently working with isolates to send queries in parallel to a database server. I have a connector-object to build the connection to the database and I would like to share that across all isolates, so I don't have to create a separate connection for every isolate.
So far it seems that I can only share special serializable objects between isolates. I'm using the send- and receive-ports for messaging. For other objects (such as my connector-object) the dart-vm yields the error:
Illegal argument(s): Illegal argument in isolate message : (object extends NativeWrapper)
Do you know of any way to share a generic object-instance between multiple isolates? Or do I have to create a separate instance for each isolate?
Thanks!
Pedro