Skip to content
This repository has been archived by the owner on Jan 6, 2019. It is now read-only.

Async counter example doesn't work (event observer's not called) #1

Open
Choochmeque opened this issue Apr 23, 2018 · 1 comment
Open

Comments

@Choochmeque
Copy link

Hello.
Trying to use this product but it doesn't work as expected, maybe I've missed something.
Qt 5.9, VS 2015 32bit
Here is code:

function spawnCounter() {
	return QuickStreams.create(function(mainStream) {
		var iteration = 0
		QuickStreams.timeout(1000, function(stream) {
			iteration++
			mainStream.event('update', iteration)
			stream.close()
		})
		.repeat()
	})
}
/* .............................................................. */
var counterStream = spawnCounter()

counterStream.event('update', function(stream, iteration) {
	console.log('current iteration:', iteration) /* <----- THIS NEVER CALLS */
})
@romshark
Copy link
Owner

QuickStreams is not a product, it's a proof of concept implementation of asynchronous programming in streams (as the README says).

Work on this particular repository was suspended for quite a while now. I'd need to investigate the problem, though unfortunatelly I've currently no time for experiments.

This experiment was suspended due to the lack of feedback so there's no evidence people really need the idea of async programing in streams in the first place when there are other well established paradigms like reactive extensions and similar. I may return to this concept and repo when there's some time to play around again and especially if the actual concept proves relevant.

Still, thank you very much for taking your time, if there are any questions please feel free to ask, I'm open for discussions and usually don't bite.

@romshark romshark changed the title Doesn't work at all Async counter example doesn't work (event observer's not called) Apr 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants