-
Notifications
You must be signed in to change notification settings - Fork 89
Rtnetlink fail #39
base: master
Are you sure you want to change the base?
Rtnetlink fail #39
Conversation
Would using single-threaded runtime help at all? I'm not sure you'll be able to force the users of the library to use a specific runtime by using language constructs, but I think it'd be reasonable to tell users to use a single-threaded runtime. |
Most likely. I haven't tried it out though.
Indeed but that's a pretty strict limitation.
Do you mind sharing it here? |
The example code still fails to open
Whilst true, this is a limitation that everyone has to workaround anyway. Somewhat related to the namespace issues - I know that if not now then at least at some point in history Docker used to spawn a new subprocess right before starting up a new container just to ensure that a single thread would ever be running at the time of spawning a container to workaround these same issues. It just so happens that there's some state that's bound to a specific thread and the users have to be mindful of that. This doesn't mean that an eventloop that's dealing with spawning new interfaces in different namespaces can't interact with other event loops, it'd just take a |
I remember seeing this error and fixing it so that should be fixable. The rest of your comment brought me a bit of joy, thanks :) I was really unhappy about this state of things and thought it was just poor design on my side. For the record, I'm traveling until the end of May, with sometimes no computer or internet access for several days/weeks, so I won't really be working on this library until then. |
This sound like there's something in there that should not implement FYI, I was actually looking into adding the capability to specify the target network namespace when querying for network links, as it is possible since this patch has landed. |
Not sure it is related or not. If I use thread 'main' panicked at 'range end index 44 out of range for slice of
length 8', `netlink-proto-0.6.0/src/codecs.rs:176:64` Problem gone, when I use |
This example show the current design flaws of rtnetlink:
The API can be fixed, but I'm less sure about the first point...