Is it undefined behavior, if a pthread adds a fd to libevent (event_new
-> cbk()
) but terminates ? I see that the cbk()
gets invoked on EV_READ
!
no it is not undefined behavior.
As long as the process where libevent base is created and dispatch function is invoked is running as expected. cbk() should be invoked on EV_READ.