I have this multithreaded app with a loop for each thread and two paired bufferevents per thread to send/receive data between those and the main thread.
This in theory. In practice, bufferevent_pair_new() returns fine, but two bufferevent structures without usable descriptors are created, so when I call bufferevent_getfd() with them, I get -1 for both.
Of course, when I try to attach them to a event loop without any other event added previously, thread returns and a "loop without events" error is raised.
I saw something similar in Tor (paired bufferevents to communicate between threads). Am I doing it right? Do I need something else?