01-25-2015, 12:24 AM
Ah. Libevent should call all callbacks on the same thread, so as long as you are in an event callback there can't be another event executing. So what you need to do is trigger the shut-down to occur on event loop thread by using a custom event.