Scott Steinbeck
03/09/2023, 11:46 PMAdam Cameron
PageContext object into yer async code and append to it?
@bdw429s didn't we look at something like this before, a few months ago? Not sure where we got to, and it's 00:30 here (only just noticed this), so I'm going to bed instead of looking further...bdw429s
03/10/2023, 6:37 AMbdw429s
03/10/2023, 6:38 AMbdw429s
03/10/2023, 6:45 AMecho( 'start<br>' )
flush;
[1,2,3,4,5].each( (i)=>{
sleep( randRange( 1, 5000 ) )
echo( 'Iteration #i#<br>' )
flush;
}, true );bdw429s
03/10/2023, 6:46 AMScott Steinbeck
03/10/2023, 6:47 AMbdw429s
03/10/2023, 6:48 AMresponseStream = getPageContext().getResponseStream();
echo( 'start<br>' )
flush;
[1,2,3,4,5].each( (i)=>{
sleep( randRange( 1, 5000 ) )
responseStream.print( 'Iteration #i#<br>' )
responseStream.flush()
}, true );bdw429s
03/10/2023, 6:49 AMbdw429s
03/10/2023, 6:49 AMbdw429s
03/10/2023, 6:50 AMScott Steinbeck
03/10/2023, 6:51 AMScott Steinbeck
03/10/2023, 5:06 PM