File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ Future<RenderResult> _renderAsync(RenderOptions options) async {
81
81
var file = options.file == null ? null : p.absolute (options.file);
82
82
CompileResult result;
83
83
if (isMainThread == true ) {
84
- print ("Creating worker thread" );
84
+ print (p.current );
85
85
final worker = Worker (p.current, WorkerOptions (workerData: {options}));
86
86
worker.on ('message' , (CompileResult msg) => result = msg);
87
87
worker.on ('error' , (JSError error) {
@@ -112,9 +112,7 @@ Future<RenderResult> _renderAsync(RenderOptions options) async {
112
112
} else {
113
113
throw ArgumentError ("Either options.data or options.file must be set." );
114
114
}
115
- parentPort? .postMessage (result);
116
- } else {
117
- throw UnsupportedError ("Failed to create worker thread." );
115
+ parentPort.postMessage (result, PortOptions ());
118
116
}
119
117
120
118
return _newRenderResult (options, result, start);
You can’t perform that action at this time.
0 commit comments