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

[sc-dev] Forcing messages on the async queue

hi there,

in a particular scenario I need to force synchronous messages to be executed after asynchronous messages within the same bundle. I don't want to start transforming the existing asynchronous messages to inject a completion packet, so I'm wondering if there is a good approach to do that. The only idea I've come up so far is to have a dummy /b_zero message as the last message in the bundle, and then put all those synchronous messages into a bundle which is used as the /b_zero's completion message.


[ nil, async1, async2, async3, [ "/async", sync1, sync2 ]]

where "/async" is some hypothetical command (wouldn't that be useful to add?).


~dummy = Buffer.alloc(s, 0, 1)

[ nil, async1, async2, async3, [ "/b_zero", ~dummy.bufnum, [ nil, sync1, sync2 ]]]

any better ideas? apart from introducing a new command "'/async", I was also wondering whether "/sync" couldn't have an optional completion message argument; that would make sense, as all other (?) asynchronous commands do have one.

best, .h.h.

sc-dev mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-dev/
search: https://listarc.bham.ac.uk/lists/sc-dev/search/