File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -295,7 +295,7 @@ suite("stream<T> lifts", () => {
295295 await checkStreamValues ( { stream, vals, typeName : "result<string>" , assertEqFn : assert . deepEqual } ) ;
296296 } ) ;
297297
298- test . only ( "example-resource" , async ( ) => {
298+ test ( "example-resource" , async ( ) => {
299299 assert . instanceOf ( instance [ "jco:test-components/get-stream-async" ] . getStreamExampleResourceOwn , AsyncFunction ) ;
300300 const disposeSymbol = Symbol . dispose || Symbol . for ( "dispose" ) ;
301301
@@ -313,9 +313,10 @@ suite("stream<T> lifts", () => {
313313 // NOTE: we have to pull all objects out of the stream and drop the stream,
314314 // *before* attempting to call async functions on the resources, to avoid
315315 // recursive re-entrancy into the same component instance
316-
317- // TODO(fix): streams should be droppable from the host side...
318- // otherwise we can't force the writer to give up writing?
316+ //
317+ // We use the line below to *ensure* the stream is dropped, and
318+ // correspondingly (somewhat racily) that the async task the writer was undergoing is done.
319+ stream [ disposeSymbol ] ( ) ;
319320
320321 let numDisposed = 0 ;
321322 for ( const resource of resources ) {
You can’t perform that action at this time.
0 commit comments