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

scheme_block_until ready function



Hello,

I'm trying to become familiar with scheme_block_until.

I created a little extension which calls

  scheme_block_until(ready, NULL, NULL, sleep)

ready is trivial, it logs that it was called and returns 1.

The documentation says that scheme_block_until calls ready periodically
and returns when ready returns true.  From my logging I can see that
ready is called many times, but scheme_block_until doesn't seem to return
until sleep expires.  Is that correct?

Also, the documentation says that if "fdf" is NULL "the thread only becomes
unblocked through Scheme actions".  What Scheme actions can cause
scheme_block_until to return?

My problem is that sometimes I will need to force scheme_block_until to
return before sleep expires and having ready return true of itself doesn't
seem to cause scheme_block_until to return.  Perhaps I could hack a solution
by having scheme_block_until also wait on a fifo descriptor, which I then
write into, but I suspect I'm overlooking a better solution.

Thanks,

Ron Stanonik
stanonik@cogsci.ucsd.edu