[Win32utils-devel] Need some help with pureRubywin32-changenotify

Berger, Daniel Daniel.Berger at qwest.com
Mon Aug 6 12:31:31 EDT 2007


Hi,
 
> > On 8/5/07, Heesob Park <phasis at gmail.com> wrote:

<snip>
 
> > Oh, one thing that I've noticed is that it sometimes returns the 
> > filename as "4913". I know I've seen this issue come up at 
> some point 
> > before (with the C code, too), but I can't remember what the answer 
> > was, and my Google skills are failing me.
> > 
> > Do you happen to remember what causes that?
> > 
> Sorry, I don't remember that issue. and I never met such case.

I was able to see this just by setting up monitoring on the current
directory, creating a file via gvim, and editing that file while that
directory was being watched.
 
> But I noticed other two issues.
> First, sometimes filename has trailing garbage characters.
> It can be fixed by modifing changenotify.rb line # 171 to
>   file = fni[12,len] + "\0\0"   # add null char

Thanks, I'll commit that change today.
 
> Second, sometimes some events missed when two or more files 
> were removed or added at the same time. I'm not sure it is a 
> known issue.

I seem to recall that win32-changenotify could never handle a large
number of simultaneous events. I think this was a limitation of the
ReadDirectoryChangesW function, but I'd have to do more research.

That being said, it does seem like the C version picks up more events
than the pure Ruby version does. So, there's a problem with the pure
Ruby win32-changenotify code, a problem with the pure Ruby win32-ipc
code, or Win32API is just not quick enough to pick up more than a few
events at a time.

Regards,

Dan


This communication is the property of Qwest and may contain confidential or
privileged information. Unauthorized use of this communication is strictly 
prohibited and may be unlawful.  If you have received this communication 
in error, please immediately notify the sender by reply e-mail and destroy 
all copies of the communication and any attachments.


More information about the win32utils-devel mailing list