-
-
Notifications
You must be signed in to change notification settings - Fork 289
Accessibility Inspector: Query AX element's Attibutes #671
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Accessibility Inspector: Query AX element's Attibutes #671
Conversation
b5dd75c to
ae8b81c
Compare
ios/dtx_codec/channel.go
Outdated
| d.responseWaiters[msg.Identifier] <- msg | ||
| select { | ||
| case d.responseWaiters[msg.Identifier] <- msg: | ||
| default: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In what situation does this happen? Dispatch is also fixed in case a consumer has already left and the response comes later, is very vague and I understand this more as in that the connection should be closed at that point if the messages are not consumed anymore!?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem with Dispatch is, let's say if a consumer leaves because of its own or its parent's ctx timeout then no one will be listening on reading channel. In that case Dispatch will remain stuck here after receiving response:
d.responseWaiters[msg.Identifier] <- msg:
so for example if we call a method and receive response from the response channel. Imagine the consumer waits for x amount of time and exits. And if response comes late from the device in that case the Dispatch will be blocked on writing to the channel.
I also made more changes.
ios/dtx_codec/channel.go
Outdated
| msg, err := d.SendAndAwaitReply(ctx, true, Methodinvocation, payload, auxiliary) | ||
| if err != nil { | ||
| log.WithFields(log.Fields{"channel_id": d.channelName, "error": err, "methodselector": selector}).Info("failed starting invoking method") | ||
| log.WithFields(log.Fields{"channel_id": d.channelName, "error": err, "methodselector": selector}).Info("ailed starting invoking method") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets keep the f 🙂
| log.WithFields(log.Fields{"channel_id": d.channelName, "error": err, "methodselector": selector}).Info("ailed starting invoking method") | |
| log.WithFields(log.Fields{"channel_id": d.channelName, "error": err, "methodselector": selector}).Info("failed starting invoking method") |
ios/dtx_codec/channel.go
Outdated
| } | ||
|
|
||
| func (d *Channel) SendAndAwaitReply(expectsReply bool, messageType MessageType, payloadBytes []byte, auxiliary PrimitiveDictionary) (Message, error) { | ||
| func (d *Channel) SendAndAwaitReply(ctx context.Context, expectsReply bool, messageType MessageType, payloadBytes []byte, auxiliary PrimitiveDictionary) (Message, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it makes a lot of sense to have this method exported, since this is a breaking change anyways, we can unexport it as well
Implemented method
deviceElement:valueForAttribute:to query Label and Identifier attributes.Note: Dispatch is also fixed in case a consumer has already left and the response comes later, so we can drop that response. Otherwise all subsequent method calls are blocked until the response is consumed