[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-dev] Re: calling the stream upon EventStreamPlayer-stop



Hi James,

Julian and I discussed this a few months ago. Here is a quick summary (that Julian may need to correct):

Patterns (like Pseq) that do not call 'yield' directly require no modification. (The work is
effectively handed off to child streams via embedInStream.)

Most of the patterns that call 'yield' directly are event patterns (Pbind, Pset, etc).
(So they always need to check for early termination.)

The only value pattern I can recall that needed rewriting was Pfin.
(Plus, of course,  the patterns you are writing:)

I think the new method could be called

	yieldEvent (terminationFunction)

to make it clear that it is a yield used by Event streams.

I think this will clean up the pattern definitions quite a bit. I will work on this in the next couple of days and post
some files for testing.

Cheers,

RJK

On Dec 31, 2005, at 11:51 AM, James Harkins wrote:

On Dec 27, 2005, at 5:10 PM, ronald kuivila wrote:

Maybe we should have yieldTestForTermination(terminationFunction) to trap the nil returns. That way, you can use embedInStream. It seems to be generally useful.

Perhaps, but to be really thorough, it gets pretty tricky. I don't see a good way to handle it at this point, because Prout(ine) isn't the only problem. Any list pattern can return events, so would Pseq for example need to know whether it should check for termination on every yield?

Maybe the distinguishing factor is not what kind of pattern produces the stream, but the fact that the stream is used in an event stream player. ??

hjh

: H. James Harkins
: jamshark70@xxxxxxxxxxxxxxxxx
: http://www.dewdrop-world.net
.::!:.:.......:.::........:..!.::.::...:..:...:.:.:.:..:

"Come said the Muse,
Sing me a song no poet has yet chanted,
Sing me the universal."  -- Whitman

_______________________________________________
sc-dev mailing list
sc-dev@xxxxxxxxxxxxxxx
http://www.create.ucsb.edu/mailman/listinfo/sc-dev