Posting here just incase someone has seem a similar issue. I have a situation where my event loop subscribes to a set of different resources(socket connects, reads, writes). It then grabs all the pollables, supplies all those pollables to a poll() function and then does some operation on them(finish-connect etc). The issue is that im getting an unknown resource index sometimes when the set is big enough during this whole event operation. I was wondering if anyone has ever seen something like this? Could be something else in the code as well
Is it possible that one (or more) of the pollables you're passing to poll
has already been disposed or given away to another component or the host? Whenever I've had an issue with invalid resource handles, that's been the reason. If not, perhaps you could open an issue with a test case that reproduces the problem?
Joel Dice said:
Is it possible that one (or more) of the pollables you're passing to
poll
has already been disposed or given away to another component or the host? Whenever I've had an issue with invalid resource handles, that's been the reason. If not, perhaps you could open an issue with a test case that reproduces the problem?
Might be something on my side. I'm printing out the handles as they come but at one particular moment the handle index just changes to a number I haven't seen before. Maybe my binary is doing something weird with the memory
Joel Dice said:
Is it possible that one (or more) of the pollables you're passing to
poll
has already been disposed or given away to another component or the host? Whenever I've had an issue with invalid resource handles, that's been the reason. If not, perhaps you could open an issue with a test case that reproduces the problem?
Forgot to reply sorry but after I switched from a mut reference holding a socket to an arc it seemed to work with no issue so I think its okay!
Till Schneidereit has marked this topic as resolved.
Last updated: Dec 23 2024 at 14:03 UTC