# "select-block-a-01.chpsimrc"
#	$Id: select-block-a-01.chpsimrc,v 1.4 2007/09/11 06:54:28 fang Exp $
# @haco@ select-block-a.haco-a

# NOTE: "in queue" now means scheduled for *checking*, 
# not nececssarily for execution!
watchall-events
queue
get a
get b
get c
get e
echo step 5
step 5
queue
get a
get b
get c
get e
time
dump-event 25
subscribers-all
echo step 1
step 1
dump-event 25
subscribers-all
echo step 1
step 1
subscribers-all
queue
echo step 4
step 4

echo event 25 still subscribed to `e'
queue
dump-event 25
subscribers-all

step
echo should wake up event 25, now in queue
queue
dump-event 25
subscribers-all
echo should have no more subscriptions
dump-event 24
echo step 4
step 4
queue

echo event 24 should be subscribed to `a' and `b'
dump-event 24
subscribers-all
get a
get b
get c
get e
echo step 2
step 2
time
queue
dump-event 24
subscribers-all

step
echo now a+ should release event 24
step
queue
dump-event 24
subscribers-all

echo step 3
step 3
queue
echo step
step
queue
echo event 18 should now be blocked on `e'
dump-event 18
subscribers-all

echo step 2
step 2
time
echo event 18 should be released
queue
dump-event 18
echo step 2
step 2
subscribers-all
echo now event 25 is waiting for handshake on `e'

echo step 3
step 3
queue
time

echo now we just let it run a while...
nowatchall-events
step 666
assert-queue

