New lock, libevent-based dev handling (untested)