Waiting for a Local Event
A sender can send a signal to a receiver in the same or different thread.
A receiver in the same or a different thread can be notified of the signal from sender.
The receiver uses WaitForEvent for a single signal or
                WaitForMultipleEvents/WaitForMultipleEventsSafe for multiple
            signals or mixed events associated with an endpoint.
Note: 
         
      WaitForEvent() is an event-blocking call. It must be called from a single thread only.
Here is a list of supported events:
- Single native event
- Single local events
Wait for a Local Event
NvSciEventLoopService *eventLoopService;
NvSciLocalEvent *localEvent;
NvSciError err;
int64_t timeout;
timeout = NV_SCI_EVENT_INFINITE_WAIT;
while (1) {
    err = eventLoopService->WaitForEvent(localEvent->eventNotifier, timeout);
        if(err != NvSciError_Success) {
            printf("error in waiting event\n");
            goto fail;
        }
    }
    /* Do something with the local event notified */
}