d-markey / squadron

Multithreading and worker thread pool for Dart / Flutter, to offload CPU-bound and heavy I/O tasks to Isolate or Web Worker threads.
https://pub.dev/packages/squadron
MIT License
79 stars 0 forks source link

Invalid argument(s): Illegal argument in isolate message: object is unsendable - Library:'dart:async' #32

Closed menghuymjq closed 6 months ago

menghuymjq commented 8 months ago

When i use squadron to chunk file for upload using dio package, i want to return progress update on file upload to display on UI. but always throw that error on pool.start(). Is there way around to solve this problem?

d-markey commented 8 months ago

Hello, I need more details before I can answer this. Are you running on Web? How do you start the worker, more specifically, what arguments are you passing to initialize your service?

Not all objects can be passed to workers and it seems you're passing something unsendable.

d-markey commented 8 months ago

Hmm according to the error message that's a problem with Isolates so not Web. Please provide more code.

d-markey commented 6 months ago

Closing this as no more feedback was provided in two months.