是否可以在 mio 中注册多个超时?

Is it possible to register multiple timeouts in mio?

我在 mio 中写了一个 TCP 服务器并注册了多个超时,但只有最后注册的超时才会触发。我是否需要为我的超时设置一个包装器来组合它们,或者是否有任何其他方法可以在 mio v0.5 中注册多个超时?

我用一个id注册了一个元组

event_loop.timeout_ms((id, ServerTimeout::T1(timeout)), duration)

没用,所以我在ServerTimeout::T1中添加了id,然后又调用了timeout_ms方法:

event_loop.timeout_ms(ServerTimeout::T1(id, timeout), duration)