node_event_hub.document_indexed+=handler# subscribe handler(sender, args)node_event_hub.document_indexed-=handler# remove the last subscription of handlernode_event_hub.document_indexed.clear()# remove every handler added from Python
The handler runs on the thread that raises the event, which can be an engine worker thread. An exception it raises there is printed to stderr and ignored; on the calling thread it reaches the engine, as in .NET.