This surely a newbie question, so my apologies in advance. I'm creating a loopback file system that temporarily blocks on read events while transfering data from a remote location.
To give my background process a little time to fetch the data, I sleep the current thread. However, doing so seems to block all operations in the VFS -- it essentially behaves as if it is single-threaded. It's easy to reproduce this in either the straight C, or Objective-C loopback examples. Using the Obj-C example, just insert the following lines in the readFileAtPath() method, right after the pread call, as follows: int ret = pread(fd, buffer, size, offset); NSLog(@"Sleeping for 10 seconds."); [NSThread sleepForTimeInterval:10]; If you run this and then try to open 2 different files, you'll see that the second file cannot be read until the read on the first file returns. My obvious question is, is this normal, and if so, how do I deal with it, keeping in mind that I will need to block on read in some fashion while spinning up my process to grab data remotely. Thanks in advance for any assistance. -- Mike -- You received this message because you are subscribed to the Google Groups "MacFUSE" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/macfuse?hl=en.
