add documentation
parent
948a7b84f3
commit
86699e347c
|
@ -53,6 +53,7 @@ class Interrupt extends EventEmitter {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// manual firing for testing
|
||||||
fire(name = 'fired') {
|
fire(name = 'fired') {
|
||||||
this.emit(name, this.hook)
|
this.emit(name, this.hook)
|
||||||
}
|
}
|
||||||
|
@ -85,6 +86,11 @@ class Interrupt extends EventEmitter {
|
||||||
}
|
}
|
||||||
|
|
||||||
start() {
|
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));
|
return this.clear().then(() => this.poller.add(this.valuefd, Epoll.EPOLLPRI | Epoll.EPOLLONESHOT));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue