Maybe id's should be newtypes to prevent confusion about what this uint is for. This sounds like it requires a linear search of all the handles' ids after waiting. Is that the case?