On 23 February 2012 08:06, Martin Schreiber wrote:
>> BTW, _how_does it detect it? That might give clue as to when a change may
>> get lost. According to Julio's reports, it seems that this happens
>> perferentially if a change is made fast, like his external formatter.
>
> On Linux it uses signals on directory change by fcntl(dirfilehandle,
> F_NOTIFY).


For my "experimental" IDE in fpGUI, I kept it simple and
cross-platform. When a file is loaded or saved, I generate a reference
SHA1 value. Then in the IDE I have separate thread running that
rechecks the SHA1 value of the current open files. If a difference is
found, the file is reloaded. My implementation is simple and can
obviously be extended to support more features. It might not be as
"optimal" as Linux signals or Windows whatever, but it was simple to
implement, works consistently across all platforms, uses no noticeable
CPU load, and has never failed to detect an external change yet.

So if the bug really can't be found, or continues not to be
reproducible by you, maybe this is an alternative
file-change-detection implementation you can think of using.

-- 
Regards,
  - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://fpgui.sourceforge.net

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

Reply via email to