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 {
8181 var file = options.file == null ? null : p.absolute (options.file);
8282 CompileResult result;
8383 if (isMainThread == true ) {
84- print ("Creating worker thread" );
84+ print (p.current );
8585 final worker = Worker (p.current, WorkerOptions (workerData: {options}));
8686 worker.on ('message' , (CompileResult msg) => result = msg);
8787 worker.on ('error' , (JSError error) {
@@ -112,9 +112,7 @@ Future<RenderResult> _renderAsync(RenderOptions options) async {
112112 } else {
113113 throw ArgumentError ("Either options.data or options.file must be set." );
114114 }
115- parentPort? .postMessage (result);
116- } else {
117- throw UnsupportedError ("Failed to create worker thread." );
115+ parentPort.postMessage (result, PortOptions ());
118116 }
119117
120118 return _newRenderResult (options, result, start);
You can’t perform that action at this time.
0 commit comments