File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -101,12 +101,19 @@ fn pandoc_writer(
101
101
os:: close ( pipe_err. out ) ;
102
102
os:: close ( pipe_in. out ) ;
103
103
104
- let stdout = result:: get ( task:: try { ||
105
- readclose ( pipe_out. in )
106
- } ) ;
107
- let stderr = result:: get ( task:: try { ||
108
- readclose ( pipe_err. in )
109
- } ) ;
104
+ let stdout_po = comm:: port ( ) ;
105
+ let stdout_ch = comm:: chan ( stdout_po) ;
106
+ task:: spawn_sched ( task:: single_threaded) { ||
107
+ comm:: send ( stdout_ch, readclose ( pipe_out. in ) ) ;
108
+ }
109
+ let stdout = comm:: recv ( stdout_po) ;
110
+
111
+ let stderr_po = comm:: port ( ) ;
112
+ let stderr_ch = comm:: chan ( stderr_po) ;
113
+ task:: spawn_sched ( task:: single_threaded) { ||
114
+ comm:: send ( stderr_ch, readclose ( pipe_err. in ) ) ;
115
+ }
116
+ let stderr = comm:: recv ( stderr_po) ;
110
117
111
118
let status = run:: waitpid ( pid) ;
112
119
#debug ( "pandoc result: %i" , status) ;
You can’t perform that action at this time.
0 commit comments