: 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 )