1

I'm use library CDEvents for monitor the file system.

When calling method flash Synchronously

- (void)flushSynchronously
{
    FSEventStreamFlushSync(_eventStream);
}

get the message

(CarbonCore.framework) FSEventStreamFlushSync(): failed assertion '(SInt64)last_id > 0LL'

Here is the method signature FSEventStreamFlushSync() from FSEvents.h

/*
 *  FSEventStreamFlushSync()
 *  
 *  Discussion:
 *    Asks the FS Events service to flush out any events that have
 *    occurred but have not yet been delivered, due to the latency
 *    parameter that was supplied when the stream was created.  This
 *    flushing occurs synchronously -- by the time this call returns,
 *    your callback will have been invoked for every event that had
 *    already occurred at the time you made this call.
 *    FSEventStreamFlushSync() can only be called after the stream has
 *    been started, via FSEventStreamStart().
 *  
 *  Parameters:
 *    
 *    streamRef:
 *      A valid stream.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.5 and later in CoreServices.framework
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   not available
 */
extern void 
FSEventStreamFlushSync(FSEventStreamRef streamRef)            __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA);
abg
  • 2,002
  • 7
  • 39
  • 63
  • did you check on which thread you're calling flush? afaik it is supposed to be called on the thread with the same runloop / dispatch queue as the one you gave in when starting the stream. Also with what kind of flags did you start the stream? And did you start it with a sinceWhen parameter? – mahal tertin Apr 16 '15 at 12:11

0 Answers0