add documentation

master
David Kebler 2017-05-15 11:01:29 -07:00
parent 948a7b84f3
commit 86699e347c
1 changed files with 6 additions and 0 deletions

View File

@ -53,6 +53,7 @@ class Interrupt extends EventEmitter {
}
// manual firing for testing
fire(name = 'fired') {
this.emit(name, this.hook)
}
@ -85,6 +86,11 @@ class Interrupt extends EventEmitter {
}
start() {
this.inter(port).on('fired', () => {
console.log(`interrupt port ${port} hook me \n ${relays}`)
// hook.bind(this)(port)
})
return this.clear().then(() => this.poller.add(this.valuefd, Epoll.EPOLLPRI | Epoll.EPOLLONESHOT));
}