Author: | randy7 |
---|---|
Mode: | factor |
Date: | Mon, 13 Apr 2009 08:25:41 |
: wait-for ( file quot delay -- ) [ curry ] dip [ sleep ] curry until ; : wait-for-file-free ( file -- ) [ file-busy? not ] 5 seconds wait-for ; ! monitors are a much better mechanism ! whenever an event comes, check for many attributes, ! that'll be much faster + more efficient than a timer. ! notify me when monitor event refers to this file, check ! the attribute i'm interested in. (ex: file-busy? not )