thrd_create method
Create a thread
Implementation
int thrd_create(thrd_t thr, int Function(dynamic) func, dynamic arg) {
try {
final exitPort = ReceivePort();
thr._exitPort = exitPort;
Isolate.spawn(_thrdRunner, _ThrdArg(func, arg, exitPort.sendPort)).then((iso) {
thr.isolate = iso;
});
return thrd_success;
} catch (_) {
return thrd_nomem;
}
}